Hi,
I'm still fairly new to solr, so please bear with me.
I'm having an amount of difficulty doing a search inside an update request 
processor (as in, solr.update.processor.UpdateRequestProcessorChain ) that I'm 
trying to write. As far as I can see there's two main options, each of which is 
presenting a problem for me:

(1) Getting a searcher from req, i.e. SolrIndexSearcher searcher = 
req.getSearcher(). The problem here is that I don't see how to get a 
SolrDocumentList or similar from this, only regular Lucene schema-less 
Documents.

(2) Using solrj by doing a SolrServer server = new 
EmbeddedSolrServer(req.getCore());. The problem here is that (a) it uses a 
deprecated constructor, and (b) creating a new SolrServer on every request 
seems wasteful - I'd like to be able to just create one once ever without 
having to do anything unpleasant with static variables or modifying code 
outside of the class that I'm writing, if possible.

So, if anyone can shed light on how to any of (a) get a SolrDocumentList from a 
SolrIndexSearcher, (b) the procedure to combine a Schema and a Lucene Document 
to retrieve the results into something useful, (c) if there's already any 
SolrServer instances somewhere global that I can get a handle to, or (d) if 
there's an approved way of persisting objects in RequestProcessors across 
queries, then that would be great.

Cheers,
Gareth

Reply via email to