Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux编程 > » 正文

Apache Solr索引富文本(html word pdf)(2)

来源: 未知 分享至:
 class SolrjTest {  
  •   
  •     public static void main(String[] args) throws IOException,  
  •             SolrServerException {  
  •   
  •         String urlString = \" http://localhost:8080/solr\";  
  •         SolrServer server = new CommonsHttpSolrServer(urlString);  
  •   
  •         SolrInputDocument doc1 = new SolrInputDocument();  
  •         doc1.addField(\"id\"12);  
  •         doc1.addField(\"content\"\"my test is easy,测试solr\");  
  •         SolrInputDocument doc2 = new SolrInputDocument();  
  •         doc2.addField(\"id\"\"solrj简单测试\");  

  • Tags:
    分享至:
    最新图文资讯
    1 2 3 4 5 6
    验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
    关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史