]> git.evergreen-ils.org Git - Evergreen.git/commit
Query Parser nested dynamic filters
authorBill Erickson <berick@esilibrary.com>
Tue, 15 May 2012 22:00:30 +0000 (18:00 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 22 May 2012 18:57:47 +0000 (14:57 -0400)
commitb90330614c99c08f67b6e51cdf2aa035edfba66b
treeddd49c053c08da5befd6e509fec5603b1370139b
parent81dbf4d6a4a2c008cac9ca3fef8b0a8158157794
Query Parser nested dynamic filters

Dynamic filters (from metabib.record_attr) are now parsed along with
search strings and facets as Query Parser descends the parse tree.  The
WHERE clause for the query as a whole is now a combination of the main
WHERE and the ON clause for JOINing to metabib.record_attr.  This gives
us the ability to create complex boolean nested queries using
SVF/record_attr filters, unlike before where nested filters were either
ignored or always treated as global filters.

For example:

concerto && ( ( item_type(a) subject|topic[Music] ) || item_form(a) )

This query now successfully limits the "concerto" search to results that
have either (item_type(a) AND subject|topic[Music]) OR item_form(a).

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