Bug 18945 - UseQueryParser system preference breaks subject searches
Summary: UseQueryParser system preference breaks subject searches
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 12742
  Show dependency treegraph
 
Reported: 2017-07-17 11:28 UTC by Jesse Maseto
Modified: 2020-11-30 21:45 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
ScreenShot1 (103.21 KB, image/png)
2017-07-17 11:28 UTC, Jesse Maseto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Maseto 2017-07-17 11:28:31 UTC
Created attachment 65071 [details]
ScreenShot1

Steps to recreate.

1.Check and make sure UseQueryParser system preference is set to "Don't Try"
2.Preform a search in koha.
3.From an items detail page click on a subject heading.
4.Koha will return results.

Next - Turn on UseQueryParser and follow same steps.

This will cause Koha to break.
Comment 1 Galen Charlton 2019-11-18 16:00:58 UTC
I can reproduce this bug when UseICU is also on.

Among other effects, UseICU will use {} rather than "" to quote a subject phrase when building the subject headings link (see bug 7092). However, a search like 

su:{Cats}

triggers an infinite loop bug in OpenILS::QueryParser->decompose().

The following warnings emitted by QueryParser with debug logging turned on gives an idea of what's going on:

Start of the loop. last_type: , joiner: &, struct: Koha::QueryParser::Driver::PQF::query_plan=HASH(0x40e1618)
Encountered class change: subject|subject#su
Start of the loop. last_type: , joiner: &, struct: Koha::QueryParser::Driver::PQF::query_plan=HASH(0x40e1618)
Encountered atom: {Wizards
Remainder: } 
Start of the loop. last_type: , joiner: &, struct: Koha::QueryParser::Driver::PQF::query_plan=HASH(0x40e1618)
Start of the loop. last_type: , joiner: &, struct: Koha::QueryParser::Driver::PQF::query_plan=HASH(0x40e1618)
Start of the loop. last_type: , joiner: &, struct: Koha::QueryParser::Driver::PQF::query_plan=HASH(0x40
... above repeats indefinitely


This bug appears to be more or less identical to one of the issues fixed by Evergreen bug https://bugs.launchpad.net/evergreen/+bug/1251359.
Comment 2 Katrin Fischer 2020-02-24 20:54:51 UTC
We've voted to remove the QueryParser code (https://wiki.koha-community.org/wiki/Development_IRC_meeting_4_March_2020), so I am closing this WONTFIX.