tags:

views:

21

answers:

1

Hi,

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 documentation 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

A: 

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

Pascal Dimassimo
maybe the OP is trying to create an embedded Solr instance.
Mauricio Scheffer
yes, you are right, I always forget about this scenario...
Pascal Dimassimo