: Lucene by default will search all segments, because it does not know that
: your field is a primary key.
: 
: Trejkaz's suggestion to early-terminate should work well.  You could also
: write custom code that uses TermsEnum on each segment.

Before you go too far down the rabit hole of writting any custom code, 
make sure to do some experiements and actaully measure the performance of 
a uniqueKey lookup using a simple needScores=false search ... the way 
TermQuery works across each segments is very low cost for the segments 
where the Term doesn't exist in any docs at all.


-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to