Searching (SearchEngine=elasticsearch) the catalogue with anything that ends with just a colon ":" gives internal server error. E.g. searching "hello:" gives this error. The code that was modified in bug 24567 would need to be adapted so that it would strip also the colon when it ends the query and not just when there is whitespace around it.
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
*** This bug has been marked as a duplicate of bug 28316 ***