The "Show analytics" links don't work with Elasticsearch and UseControlnumber enabled. To test: - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics" => there will be no result What the search tries to do: rcn:11388674 and (bib-level:a or bib-level:b) - find a record with $w 11388674 - that is also a serial or monographic component part (LDR pos 7) rcn: search alone works. bib-level:a alone works Something wrong with the search syntax for Elasticsearch maybe?
Created attachment 109423 [details] [review] Bug 26313: "Show analytics" link must use uppercase for booleans In elasticsearch we only treat AND and OR as boolean operators if they are capitalized To test: - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics" => there will be no result - Apply patch - restart and reload - Try again - It works! - Switch SearchEngine syspref to 'Zebra' - Test again - It still works!
Well, this is interesting. Shouldn't we make the query parser handle things without case sensitivity?
(In reply to Tomás Cohen Arazi from comment #2) > Well, this is interesting. Shouldn't we make the query parser handle things > without case sensitivity? I see an advantage of this behaviour. If a record title contains 'and' or 'or' they won't get seen as boolean operators (= less accidental booleans). I believe that this is an issue with Zebra currently, but couldn't locate the right bug.
I agree! Let's push this forward!!
I'll sign off and provide a few missing changes (OPAC). Tomas, can you then take over for QA?
Created attachment 109457 [details] [review] Bug 26313: "Show analytics" link must use uppercase for booleans In elasticsearch we only treat AND and OR as boolean operators if they are capitalized To test: - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics" => there will be no result - Apply patch - restart and reload - Try again - It works! - Switch SearchEngine syspref to 'Zebra' - Test again - It still works! Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 109458 [details] [review] Bug 26313: (follow-up) Fix OPAC and "Show volumes" links Elasticsearch requires the booleans in search requests to be uppercase. This fixes the "Show analytics" link in OPAC (same as first patch for intranet) and the "Show volume" link. To test both patches: Set UseControlNumber = Use 1) "Show analytics" - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - For both staff and OPAC: - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics", it should show your analytical record - Switch to "Zebra" - verify links still work. 2) "Show volumes" - Turn SearchEngine to Elasticsearch again - Pick any serial record in your database, make sure 001 is set - Set LDR, pos. 19 = a - Set - Note 001 value - Find another record and edit it - Set LDR, pos. 19 = a or b, LDR 7 not a or b (m will work) - Set 773$ title of set record $w 001 of set record - For both staff and OPAC: - Click on the "In: link, it should bring up your set record - Click on the "Show volumes" link, it should bring up the volume - Switch to "Zebra" - verify all links still work. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 109509 [details] [review] Bug 26313: "Show analytics" link must use uppercase for booleans In elasticsearch we only treat AND and OR as boolean operators if they are capitalized To test: - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics" => there will be no result - Apply patch - restart and reload - Try again - It works! - Switch SearchEngine syspref to 'Zebra' - Test again - It still works! Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 109510 [details] [review] Bug 26313: (follow-up) Fix OPAC and "Show volumes" links Elasticsearch requires the booleans in search requests to be uppercase. This fixes the "Show analytics" link in OPAC (same as first patch for intranet) and the "Show volume" link. To test both patches: Set UseControlNumber = Use 1) "Show analytics" - Turn SearchEngine to Elasticsearch and make sure it works - Pick any serial record in your database, make sure 001 is set - Go to new > new child record - Fill in 245 and save - For both staff and OPAC: - Click on the "In" link, it should bring you to the parent record - Click on "Show analytics", it should show your analytical record - Switch to "Zebra" - verify links still work. 2) "Show volumes" - Turn SearchEngine to Elasticsearch again - Pick any serial record in your database, make sure 001 is set - Set LDR, pos. 19 = a - Set - Note 001 value - Find another record and edit it - Set LDR, pos. 19 = a or b, LDR 7 not a or b (m will work) - Set 773$ title of set record $w 001 of set record - For both staff and OPAC: - Click on the "In: link, it should bring up your set record - Click on the "Show volumes" link, it should bring up the volume - Switch to "Zebra" - verify all links still work. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.04
backported to 19.11.x for 19.11.10
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.