[Koha-bugs] [Bug 28736] Better error message when ES fails to understand the syntax of the search query

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 2 22:55:17 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28736

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #123181|0                           |1
        is obsolete|                            |

--- Comment #3 from David Nind <david at 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 at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list