Summary: | Lower case "or" results in broken ElasticSearch queries | ||
---|---|---|---|
Product: | Koha | Reporter: | David Gustafsson <glasklas> |
Component: | Searching - Elasticsearch | Assignee: | David Gustafsson <glasklas> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | bibliwho, jonathan.druart, marjorie.barry-vila, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Change hardcoded instances of lower case "or" in search queries to be compatible with ElasticSearch query syntax
Change hardcoded instances of lower case "or" in search queries to be compatible with ElasticSearch query syntax Bug 19197: Change lower case "or" to upper case Bug 19197: Fix multibranch limits in ElasticSearch |
Description
David Gustafsson
2017-08-29 13:42:01 UTC
Created attachment 66583 [details] [review] Change hardcoded instances of lower case "or" in search queries to be compatible with ElasticSearch query syntax I think there are also some cases for or/OR in the XSLT templates probably. Created attachment 75114 [details] [review] Change hardcoded instances of lower case "or" in search queries to be compatible with ElasticSearch query syntax Rebased against Koha master. Unable to apply patch to either Sandbox 11 or 13. Created attachment 80688 [details] [review] Bug 19197: Change lower case "or" to upper case This makes the search queries compatible with ElasticSearch query syntax -- rebased by Mark Tompsett <mtompset@hotmail.com> Created attachment 92607 [details] [review] Bug 19197: Fix multibranch limits in ElasticSearch Two issues here: 1 - OR must be capitalized 2 - The 'branch' is not analyzed and turned into 'homebranch' correctly. If we specify 'homebranch' we can later build in a 'holdingbranch' search too To test: 1 - Go to Administration -> Library Groups 2 - Create a search group for staff and opac 3 - Add two libraries 4 - Perform an advanced search, limit to the group you just created 5 - Note the number of results 6 - Switch SearchEngine syspref to 'Elasticsearch' 7 - Repeat search, note it fails 8 - Apply patch 9 - Restart all the things 10 - Repeat the search 11 - Success! Number of results should match previous search 12 - Switch SearchEngine to 'Zebra' 13 - Repeat search 14 - Success! Search works and number of results matches The patch works perfectly with ElasticSearch, whatever I search, using the search group. But with Zebra, the search fails if "or" is a term I want to search (worked with ElasticSearch). Since this issue seams to have gone people by but the same changes has been introduced in Bug 23322 and bug 24506 respectively I will obsolete the current patch. Found another occurrence of hard coded boolean operator in bulkmarcimport.pl though. *** This bug has been marked as a duplicate of bug 23322 *** Created new issue for this (Bug 25616). |