java 什么是HttpSolrServer的替换solrServer =新的HttpSolrServer(builder.build().toString());

bvjxkvbb  于 2022-12-17  发布在  Java
关注(0)|答案(3)|浏览(80)

什么是替换

HttpSolrServer solrServer = new HttpSolrServer(builder.build().toString());
qoefvg9y

qoefvg9y1#

这是一个解决方案:
solrClient solrServer =新的HttpSolrClient.构建器(solrLocation).构建();

piok6c0g

piok6c0g2#

正如文档所述:
已弃用。请使用HttpSolrClient
@已弃用的公共类HttpSolrServer扩展了HttpSolrClient

HttpSolrClient solrServer = new HttpSolrClient (builder.build().toString());
4sup72z8

4sup72z83#

Solrj 9.x使用以下内容

SolrClient client = new Http2SolrClient.Builder("http://localhost:8983/solr/Collection1").build()

相关问题