]> git.evergreen-ils.org Git - Evergreen.git/commit
Bug #1044721: QP handles explicit group+joiner badly
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 1 Sep 2012 14:21:51 +0000 (10:21 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 4 Sep 2012 20:22:34 +0000 (16:22 -0400)
commitb77bb9943009b81042b4ef1a6ac33ec9e3e96dd7
tree486a5df3366b1ac1d1e1254048eeced670f6cbe1
parent37b7f30ea722a68890593590f995bf80143492ec
Bug #1044721: QP handles explicit group+joiner badly

Although the following four queries should be equivalent:
  george  ||  fred
 (george) ||  fred
  george  || (fred)
 (george) || (fred)

The Pg QueryParser driver generates SQL queries that return different
numbers of results for each of those queries, with all desired results
appearing only with the first query. This seems to be because of the way
filters are added in the interface.

This patch adjusts the Search code in TPAC to add an explicit group
around the user-entered query, which enables the Pg QueryParser driver
to handle all four of the above queries properly.

This patch should also resolve the problems encountered with the patch
for bug #1040740, "Implicit ANDs should have higher precedence than
explicit ORs"

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm