https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33406
--- Comment #2 from Janusz Kaczmarek <[email protected]> --- Jonathan, thank you for the patch. I'll test it and it most probably will do its job. At the same time, I'm not quite sure if all we can do is to catch error. IMHO it will be rather surprising for an librarian to see information about an error and a prompt to try again while searching (with default settings) for an existing authority (and hyphens surrounded by spaces normally occur e.g. in corporate names or in series titles). Couldn't we, retaining the catching mechanism, also add somehow a correction like this: --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -1228,6 +1228,8 @@ sub _split_query { # Filter out empty values @tokens = grep( /\S/, @tokens ); + # Filter out some known isolated trouble makers: -, ^, \, ~, + + @tokens = grep( !/^[-\^\\~\+]*$/, @tokens ); return @tokens; } [The auth 'contains' query goes always through _split_query which is called by _truncate_terms] This would prevent most known issues to emerge. (I was unable, due to lack of time, to prepare the official patch by myself). -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
