lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Fastest way to fetch N documents with unique keys within large numbers of indexes..
Date Tue, 07 Jun 2005 06:13:46 GMT

: was computing the score.  This was a big performance gain.  About 2x and
: since its the slowest part of our app it was a nice one. :)
: We were using a TermQuery though.

I believe that one search on one BooleanQuery containing 20
TermQueries should be faster then 20 searches on 20 TermQueries.

: >2) have you tried sorting your terms first, then opening a TermDocs on the
: >   first one, and seeking to each of the remaining terms?  it seems like
: >   that would be faster then opening a new TermDocs for each Term.
: >
: >
: How do I do this?  I just assumed that termDocs was already sorted...
: I don't see any mention of this in the API...

I'm not talking about any special API to sort a TermDocs -- it is sorted.

I'm saying you should start by sorting your input (the 10-20 unique IDs
you mentioned) and then seek to the first ID, then using the same
TermDocs instance, seek to the second ID, etc....


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message