lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Problem with ResponseBuilder
Date Thu, 03 Sep 2009 23:04:22 GMT

: DocListAndSet results = new DocListAndSet();
: Hits h =;
: 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 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.


View raw message