Optimize adjacent same-boolean-op searches

Bug #1281280 reported by Mike Rylander
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

From the commit message:

    Implement adjacent-node pull-up optimization

    If one has a long list of boolean operations, such as can
    be generated by third-party products looking for a book that
    might have one of several different ISBNs, those are currently
    searched separatelly, in a deep nested set of joined full-text
    queries. This behavior was introduced to address problems of
    non-deterministic grouping of boolean operations, along with
    them generally not working in complex situations. We call
    the mechanism "boolean push-down", because it explicitly
    bifurcates the tree at each boolean operator.

    This is suboptimal in the case of adjacent, like boolean ops.

    This commit re-compresses the parse tree for adjacent nodes
    that use the same boolean operator and are composed of atoms
    only (that is, no modifiers, filters, or phrases). It ignores
    any explicit groupings by the user, the "magical" floating
    subplan, any subplans that include filters or modifiers, and
    any nodes that have a mix of boolean operators between their

    This is probably more conservative that is strictly necessary,
    and phrases would likely be safe, but baby steps.


Kathy Lussier (klussier)
tags: added: pullrequest
Revision history for this message
Mike Rylander (mrylander) wrote :

I've ended up pulling this code (and an enhancement for collapsing empty and nearly-empty nodes) into the fix for bug 1005040 as it's necessary to collapse the query parse tree appropriately for that change.

Changed in evergreen:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers