]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP1281280: Implement adjacent-node pull-up optimization
authorMike Rylander <mrylander@gmail.com>
Mon, 17 Feb 2014 18:00:12 +0000 (13:00 -0500)
committerKathy Lussier <klussier@masslnc.org>
Thu, 9 Feb 2017 20:45:08 +0000 (15:45 -0500)
commitb8d8e210dfa6c2a247f14f2d468960a795326867
treecd5a9974f906e9e5959f6d51028cc28b8b0977de
parentfc8af9f703333ba9b963854f95e3755b9c838f08
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