: My problem was that the XMLResponseWriter is using the searcher of the
: original request to get the matching documents (in the method writeDocList
: of the class XMLWriter). Since the DocList contains id from the index of the
: second core, there were not valid in the index of the core receiving the
: request.

correct.  to deal with this type of problem in distributed search, the 
SolrDocumentList class was introduced -- if you call getSearcher() on your 
LocalSolrQueryRequest you can use that to build up a SolrDocumentList from 
the DocList, and then add that to your response.

BTW...

: > public void handleRequestBody(SolrQueryRequest request, SolrQueryResponse
: > response)
        ...
: >         request = new LocalSolrQueryRequest(coreToRequest, params);
: > 
: >         SolrRequestHandler mlt = coreToRequest.getRequestHandler("/mlt");
: >         coreToRequest.execute(mlt, request, response);

this doesn't look safe ... SolrQueryRequest objects need to be closed 
when they're finished, and you aren't doing that here.  as a result the 
searcher ref obtained for the life of the request won't be closed.


-Hoss

Reply via email to