Apache Solr索引富文本(html word pdf)(2)
日期:2011-11-02
点击:196
来源: 未知
分享至:
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简单测试\");
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史