2
Plz建议,我可以如何运行command = full-import?如何运行使用SolrJ完全导入命令
SolrServer solrServer = new HttpSolrServer("http://localhost:8080/solr");
然后呢......
的感谢!
Plz建议,我可以如何运行command = full-import?如何运行使用SolrJ完全导入命令
SolrServer solrServer = new HttpSolrServer("http://localhost:8080/solr");
然后呢......
的感谢!
看看这个wiki页面和那里的拼写检查示例。它使用旧的CommonsHttpSolrServer
,但它与你想要的相似。这个代码应该是你要找的东西,尽管我还没有尝试过它:
SolrServer solrServer = new HttpSolrServer("http://localhost:8080/solr");
ModifiableSolrParams params = new ModifiableSolrParams();
params.set("qt", "/dataimport");
params.set("command", "full-import");
QueryResponse response = solrServer.query(params);