lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Internals question: BooleanQuery with many TermQuery children
Date Tue, 07 Apr 2009 03:04:44 GMT
Hi all.

This is something I have been wondering for a while but can't find a 
good answer by reading the code myself.

If you have a query like this:

   ( field:Value1 OR
     field:Value2 OR
     field:Value3 OR
      ... )

How many TermEnum / TermDocs scans should this execute?

(a) One per clause, or
(b) One for the entire boolean query?

I wonder because we do use a lot of queries of this nature, and I can't 
find any direct evidence that they get logically merged, leading me to 
believe that it's one per clause at present (and thus this becomes a 
potential optimisation.)


Daniel Noll                            Forensic and eDiscovery Software
Senior Developer                              The world's most advanced
Nuix                                                email data analysis                                and eDiscovery software

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

View raw message