Query Parser merged copy filters
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(
( 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/
Changed in evergreen: | |
milestone: | none → 2.3.0-alpha |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
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)'