In some places a literal "or" is used to build search queries which probably works with Zebra, but not with ElasticSearch. Replacing theses occurrences fixes the problem in those cases. This is just a band aid, not addressing the real issue which is (I guess) that a query abstraction interface is needed, and zebra-specific syntax should not be used directly in search queries, but this will at least solve this particular issue.
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).