[Bug 28736] New: Better error message when ES fails to understand the syntax of the search query
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Bug ID: 28736 Summary: Better error message when ES fails to understand the syntax of the search query Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: stalkernoid@gmail.com "Unable to perform your search. Please try again." error message doesn't provide any information to the user about the problem and can be really confusing, it implies that by simply performing the search again the result may be different somehow, while in reality the search query probably has incorrect ES syntax which will never work no matter how many times you try, asking user to "Please try again" is redundant. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stalkernoid@gmail.com Assignee|koha-bugs@lists.koha-commun |stalkernoid@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #1 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 123046 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123046&action=edit Current "Unable to perform your search. Please try again." error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #2 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 123181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123181&action=edit Bug 28736: fix requirements for the correct error message to show up There is existing error message in the code stating: "Unable to understand your search query, please rephrase and try again." which fits perfectly but because it looks for "ParseException" in the warning output it doesn't show up on this page as it's actually "parse_exception". This patch makes that it's also checked if "parse_exception" is present in the warning output. To reproduce: 1) using ES search for something like "// ^ ! { } [ ] .. , <>" that will for sure break the syntax of ES. 2) after the search query fails note that the error is "Unable to perform your search. Please try again." 3) apply the patch 4) search for the same thing again 5) error message should be "Unable to understand your search query, please rephrase and try again." now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28316 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123181|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 123404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123404&action=edit Bug 28736: fix requirements for the correct error message to show up There is existing error message in the code stating: "Unable to understand your search query, please rephrase and try again." which fits perfectly but because it looks for "ParseException" in the warning output it doesn't show up on this page as it's actually "parse_exception". This patch makes that it's also checked if "parse_exception" is present in the warning output. To reproduce: 1) using ES search for something like "// ^ ! { } [ ] .. , <>" that will for sure break the syntax of ES. 2) after the search query fails note that the error is "Unable to perform your search. Please try again." 3) apply the patch 4) search for the same thing again 5) error message should be "Unable to understand your search query, please rephrase and try again." now. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 e.betemps <e.betemps@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |e.betemps@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123404|0 |1 is obsolete| | --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 123985 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123985&action=edit Bug 28736: fix requirements for the correct error message to show up There is existing error message in the code stating: "Unable to understand your search query, please rephrase and try again." which fits perfectly but because it looks for "ParseException" in the warning output it doesn't show up on this page as it's actually "parse_exception". This patch makes that it's also checked if "parse_exception" is present in the warning output. To reproduce: 1) using ES search for something like "// ^ ! { } [ ] .. , <>" that will for sure break the syntax of ES. 2) after the search query fails note that the error is "Unable to perform your search. Please try again." 3) apply the patch 4) search for the same thing again 5) error message should be "Unable to understand your search query, please rephrase and try again." now. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #123985|0 |1 is obsolete| | --- Comment #5 from Andrew Nugged <nugged@gmail.com> --- Created attachment 124005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124005&action=edit Bug 28736: fix requirements for the correct error message to show up There is existing error message in the code stating: "Unable to understand your search query, please rephrase and try again." which fits perfectly but because it looks for "ParseException" in the warning output it doesn't show up on this page as it's actually "parse_exception". This patch makes that it's also checked if "parse_exception" is present in the warning output. Side note: "ParseException" reaction code was added here: e0f6c4dc Bug 12478: improve error reporting a bit Search::Elasticsearch seems propagates clean ES JSON answer, and in current ES version inside of $@ it contains "parse_exception" string in dumped JSON answer ("'type' => 'parse_exception'"). Old seeked phrase "ParseException" wasn't reproduced, only in ES logs ("Caused by: org.apache.lucene.queryparser.classic.ParseException: Cannot parse ..."). Check for both phrases won't complicate future changes, but this note added for reference and code cleanup if needed. To reproduce: 1) using ES search for something like "// ^ ! { } [ ] .. , <>" that will for sure break the syntax of ES. 2) after the search query fails note that the error is "Unable to perform your search. Please try again." 3) apply the patch 4) search for the same thing again 5) error message should be "Unable to understand your search query, please rephrase and try again." now. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Andrew Nugged <nugged@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #6 from Andrew Nugged <nugged@gmail.com> --- Created attachment 124006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124006&action=edit Bug 28736: (QA follow-up) hints in explanation about broken syntax Add direct hint for the user what might be the issues with search phrase. In most cases we have unescaped or not removed special characters when user copy-pastes book name. If we explain that error happens because there is special search language, user will know what to research because we explicitly will tell that this is NOT the empty result, but search wasn't performed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #7 from Andrew Nugged <nugged@gmail.com> --- This "sub process_error" code was added here: e0f6c4dc Bug 12478: improve error reporting a bit And it expected to get 'ParseException' inside of $@. I didn't found any traces and explanations when we have text with "ParseException" from ES, is it older ES versions that had such word? (Search::Elasticsearch seems just propagates clean ES answer though) Nowadays we have "parse_exception" in "$@" contents, in dumped JSON answer from ES it contains answer body with "'type' => 'parse_exception'" value. I don't think the "ParseException" presence will make future updates more complicated but let's have this history-of-thoughts noted in the commit message, Part2: QA-follow-up: in my experience, I had a lot of users thinking that "nothing was found", when ES error happened. I changed the phrase to be wordier but to explain that there MIGHT be results, but the user needs to review his request. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124006|0 |1 is obsolete| | --- Comment #8 from Andrew Nugged <nugged@gmail.com> --- Created attachment 124007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124007&action=edit Bug 28736: (QA follow-up) hints in explanation about broken syntax Add direct hint for the user what might be the issues with search phrase. In most cases we have unescaped or not removed special characters when user copy-pastes book name. If we explain that error happens because there is special search language, user will know what to research because we explicitly will tell that this is NOT the empty result, but search wasn't performed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124007|0 |1 is obsolete| | --- Comment #9 from Andrew Nugged <nugged@gmail.com> --- Created attachment 124008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124008&action=edit Bug 28736: (QA follow-up) hints in explanation about broken syntax Add direct hint for the user what might be the issues with search phrase. In most cases we have unescaped or not removed special characters when user copy-pastes book name. If we explain that error happens because there is special search language, user will know what to research because we explicitly will tell that this is NOT the empty result, but search wasn't performed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #10 from Andrew Nugged <nugged@gmail.com> --- Note for RM: it's now about "human language", not Perl question – please confirm my last patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124008|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA --- Comment #11 from Andrew Nugged <nugged@gmail.com> --- I removed the last mine patch, I will create a separate ticket about that. (it's about "Part2: QA-follow-up:" in my message above. Putting back ticket to PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #13 from David Cook <dcook@prosentient.com.au> --- Since Andrii Nugged and Peter/Petro Vashchuk are teammates (https://perlkohacon.fi/Team.html), it was against the Koha community rules for Andrii to QA this bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736 --- Comment #14 from Andrii Nugged <nugged@gmail.com> --- It was double Singed-Off in between from outside, so "realion" was detached, and we were aware that it's not direct and thought: allowed. If even so it was against the rules - noted. Thank you for the clarification. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org