]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP1281280: Implement adjacent-node pull-up optimization user/miker/optimize_adjacent_like-class_bools
authorMike Rylander <mrylander@gmail.com>
Mon, 17 Feb 2014 18:00:12 +0000 (13:00 -0500)
committerMike Rylander <mrylander@gmail.com>
Mon, 17 Feb 2014 20:34:37 +0000 (15:34 -0500)
commite0d1c558081350ed6c214fbdd07593d49a8b9274
tree82550febe6310230786f233f660c8f0b1dfdc6b0
parent4e609b2e37996266cf1f9547382daaf7e0df611b
LP1281280: 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
atoms.

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

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm