QueryParser handles explicit group+operator badly

Bug #1044721 reported by Jared Camins-Esakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Won't Fix
Undecided
Unassigned

Bug Description

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. The problem seems to be in the code that generates the initial query in TPAC and JSPAC. A patch for TPAC will follow.

Revision history for this message
Jared Camins-Esakov (jcamins) wrote :

A patch for this can be found in the working repository in the branch user/jcamins/bug_1044721

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Hi Jared.

Wow, I didn't expect an effective workaround to be that simple, but that does indeed seem to solve the problem in the TPAC. Possibly somebody will want to fix the QueryParser Pg driver so that this grouping workaround isn't necessary in the future, but I don't see what this hurts.

This works just fine in my tests, so I'm pushing to master and backporting through rel_2_2.

Changed in evergreen:
milestone: none → 2.4.0-alpha
status: New → Fix Committed
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Reopening this on upon reports of facets being broken by it, and possibly other side effects. :-(

Here's a reversion commit to be pushed to master and backported through rel_2_2 once signed-off by another:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/senator/revert_1044721

Revision history for this message
Dan Scott (denials) wrote :

Confirmed that this reversion resolves the facet searching problems on our system.

I've signed off at user/dbs/revert_1044721 in working.

Changed in evergreen:
status: Fix Committed → Confirmed
Revision history for this message
Ben Shum (bshum) wrote :

Hmm, was committed to master, rel_2_3 and rel_2_2 already. Marking new statuses

Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
Ben Shum (bshum) wrote :

Gah, just realized right after I did that, that I've read this backwards. Not fixed, needs re-testing now that new QP is on the scene?

Changed in evergreen:
status: Fix Committed → Incomplete
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Ben Shum (bshum)
no longer affects: evergreen/2.2
no longer affects: evergreen/2.3
Changed in evergreen:
status: Incomplete → Won't Fix
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.