lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Short circuit in query ...
Date Wed, 21 Apr 2010 13:24:23 GMT
Lucene attempts to drive the query by the clause that's least
frequent, so order or your clauses will not matter.

But, it uses a simplistic heuristic to do so: it looks at the first
docID for each sub-clause and then reorders them in decreasing docID
order.  This isn't a perfect optimization since conceivably a
low-count sub-clause could just happen to have eg docID 0 matching.

Mike

On Tue, Apr 20, 2010 at 6:12 PM, John4982 <john4982@gmail.com> wrote:
>
> Hi
>
> does Lucene search uses short-circuit when i execute query like:
>
> A:10 AND b:20 AND c:30
>
> In general, does position of field names can impact search performance e.g.
> if field A with value 10 is more frequent is this mean that this will be
> slower than if value 10 is less frequent?
>
> best
> John
> --
> View this message in context: http://n3.nabble.com/Short-circuit-in-query-tp738551p738551.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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