You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ype Kingma <yk...@xs4all.nl> on 2002/01/31 20:05:33 UTC

Obtaining all results efficiently. Closing a searcher.

Dear Lucene'd,

Suppose I would like to retrieve all docs that are resulting from a query.
I should then use the search() call with the HitCollector argument
which is called back with collect(docNr, score)

Would it be wise to sort by docNr when using IndexReader.doc(docNr) to
get to the stored fields?

And another question. I looked at the source for searcher.close() and
found that it closes its reader. Does that close the index reader used
to perform the search? That would interfere with a strategy to keep
an index reader open as long as possible and share it between threads.

Thanks in advance,
Ype

-- 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>