lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <>
Subject Search performance using BooleanQueries in BooleanQueries
Date Fri, 26 Oct 2007 07:36:58 GMT

I am seeing that a query with boolean queries in boolean queries takes
much longer than just a single boolean query when the number of hits if
fairly large. For example 

+prop1:a +prop2:b +prop3:c +prop4:d +prop5:e 

is much faster than 

(+(+(+(+prop1:a +prop2:b) +prop3:c) +prop4:d) +prop5:e)

where the second one is a result from BooleanQuery in BooleanQuery, and
all have Occur.MUST.

Is there a way to detect and rewrite the second inefficient query?
query.rewrite() does not change the query AFAICS. 

thanks for any help,

Regards Ard


Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
------------------------------------------------------------- / /

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

View raw message