Query Parser merged copy filters

Bug #1002321 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

The inspiration for this work comes from bug #986324.

When more than one copy-level filter (e.g. locations()) is used in a query-parser query, all but the first are ignored. The goal of this work is to compress multiple copy-level filters into a single filter that represents the full collection. Wherever possible, boolean structures will be honored, to the extent possible for post-search copy-level filters.

Examples:

concerto locations(1,2) locations(3,4)

==> concerto locations(1,2,3,4)

( concerto locations(3,4,5) ) || (piano locations(3,5,7))

==> ( concerto || piano ) locations(3,4,5,6,7)

( concerto locations(3,4,5) ) && ( piano locations(3,5,7) )

==> concerto piano locations(3,5)

Note, in the last 2 examples, the final query does not exactly match the original. This is because copy-level filters are applied after the initial search and cannot be executed as part of the nested query. The best we can do is create a representation of the final copy-level filter, based on the nesting, and apply it to the final result of the nested search.

Code is at collab/berick/qp-merge-copy-filters @ working

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/berick/qp-merge-copy-filters

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

This branch covers most use cases as-is, but for broader support, bug #1000884 should be merged first. Otherwise, standalone filters will be ignored. For example, w/o bug #1000884, 'concerto locations(1,2,3) ( locations(2,3,4) )' would result in a search for 'concerto locations(1,2,3)'

Revision history for this message
Mike Rylander (mrylander) wrote :

Merged to master -- solid work, sir!

Changed in evergreen:
status: New → Fix Committed
Bill Erickson (berick)
Changed in evergreen:
milestone: none → 2.3.0-alpha
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.