lucene-java-user mailing list archives

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

>I haven't profiled either of thse suggestions but:
>1) have you tried constructing a BooleanQuery of all 10-20 terms? Is the
>   total time to execute the search, and access each Hit slower then your
>   termDocs approach?
Actually using any type of query was very slow.  The problem was when it 
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 wonder if there's a way to tell lucene not to score.  Maybe I could 
then use a BooleanQuery with internal TermQueries and then scan the 
indexes once each. 

>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...



Use Rojo (RSS/Atom aggregator)! - visit 
See #rojo if you want to chat.

Rojo is Hiring! -

   Kevin A. Burton, Location - San Francisco, CA
      AIM/YIM - sfburtonator,  Web -
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412 

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

View raw message