Summary: | Searching with colon ":" in the end of query gives internal server error | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Searching - Elasticsearch | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | bolshawh, dcook, lucy.vaux-harvey, nugged, stalkernoid |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24567 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28316 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | Bug 28292: strip the colon when it ends the query |
Description
Joonas Kylmälä
2021-05-06 09:45:12 UTC
Created attachment 121273 [details] [review] Bug 28292: strip the colon when it ends the query This patch adds additional regexp that strips the colon when it ends the query to avoid the internal server error. Also this patch adds new tests that check if colon gets removed from the very beginning and the very end of the query. To reproduce: 1) Enable ES and try to search "test:", which should give the internal server error. 2) Apply the patch, perform the same search again. Make sure that it doesn't gives that same error. 3) Additionally run t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t test and ensure that all tests are successful. Searching with "host-item:spr:n" even with this patch gives still error |