You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2009/09/04 01:04:22 UTC

Re: Problem with ResponseBuilder

: DocListAndSet results = new DocListAndSet();
: Hits h = searcher.search(rb.getQuery());
	...
: Is this the correct way to obtain the docs?

Uh.... not really.  why are you using the Hits method at all?  why don't 
you call the searcher.search method that returns a DocListAndSet instead?  
(Hits is a deprecated method in Lucene, and in Solr it doesnt' take 
advantage of any of hte caches)

: I'm receiving a null java.lang.NullPointerException with this code.

FYI: that's because results.docList is null until something assigns a new 
DocList to it ... if you want to build you'r own from scratch, you've got 
to instantiate it.



-Hoss