开发者

How do I get a Solr ResourceLoader from a SolrServer?

开发者 https://www.devze.com 2023-01-13 01:05 出处:网络
My application uses solrj. I have a reference to a SolrServer object. The SolrServer object was created by instantiating a new CommonsHttpSolrServer object with the URL to my Solr server as the constr

My application uses solrj. I have a reference to a SolrServer object. The SolrServer object was created by instantiating a new CommonsHttpSolrServer object with the URL to my Solr server as the constructor argument.

I now need a reference to a class called a ResourceLoader. I can't figure out how to get it. I know that a SolrCore object has a method that returns a ResourceLoader, but I don't have a SolrCore object either. I tried calling the deprecated static method SolrCore.getSolrCore(), but that didn't work (it generates an error saying it can't find solrconfig.xml, which doesn't make much sense since that file is on the server).

The documentat开发者_StackOverflowion is very frustrating - few of the methods are actually documented at all, and there is nothing to indicate what chain of calls I need to make to get the objects I need.

Thanks,

Frank


SolrCore and ResourceLoader are not accessible from a client calling Solr using solrj. Those are server-side classes.

0

精彩评论

暂无评论...
验证码 换一张
取 消