Hi
That quote is from the javadoc for HitCollector/TopDocCollector.collect(). You missed out the bit saying "This is called in an inner search loop". If, as your subject implies, you want to get at the Document object AFTER the search, those methods are fine. Just don't use them for any more documents than you need, and not inside the collect() method. If you really need to get at document data inside the inner search loop I think you'll have to accept the performance hit or look into advanced stuff like payloads. -- Ian. On Mon, Feb 2, 2009 at 11:54 AM, mittals <sourabh-931.mit...@morganstanley.com> wrote: > > As per Lucene documentation - > "For good search performance, implementations of this method should not call > Searcher.doc(int) or IndexReader.document(int) on every document number > encountered. Doing so can slow searches by an order of magnitude or more." > > My question is - what's the other way to get the Document object to avoid > performance bottleneck? > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org