lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mordo, Aviran (EXP N-NANNATEK)" <aviran.mo...@lmco.com>
Subject RE: Does order of BooleanQuery clauses affect search performance?
Date Fri, 26 Aug 2005 16:20:42 GMT
As far as I remember the order of Queries in a BooleanQuery does not
affect performance. (but I may be wrong)

Aviran
http://www.aviransplace.com

-----Original Message-----
From: Paul.Illingworth@saaconsultants.com
[mailto:Paul.Illingworth@saaconsultants.com] 
Sent: Friday, August 26, 2005 11:59 AM
To: java-user@lucene.apache.org
Subject: Does order of BooleanQuery clauses affect search performance?





A simple question and I guess it may have been asked before.

Does the order of Querys in a BooleanQuery affect search speed? By this
I mean if the first clause of a BooleanQuery only returns a few results
and the second clause returns lots of results and the two are ANDed is
this faster than the other way around? Similarly, does searching stop if
no results are found and the logical operations would mean no results
can be found (similar to Javas "short circuiting" of logical
operations)?

I ask because I am creating some reasonably complex queries and if I can
get a boost by simply organising the logic sensibly then I will.

Regards

Paul I.


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



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


Mime
View raw message