FAQ
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

Search Discussions

  • Ian Lea at Apr 21, 2010 at 10:39 am
    The order does not matter but searches on terms with few matches are
    likely to be quicker than searches on terms with many matches,


    --
    Ian.

    On Tue, Apr 20, 2010 at 11:12 PM, John4982 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
  • Michael McCandless at Apr 21, 2010 at 1:24 pm
    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 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedApr 21, '10 at 10:21a
activeApr 21, '10 at 1:24p
posts3
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase