From d9a5b6d3aab2a4b2b9b3c5d3d0492c7aaa80a031 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Thu, 14 Jan 2021 13:16:30 +0000 Subject: [PATCH] Bug 27431: Elasticsearch - escape words that equal to hyphen or starting with more than one hyphen Signed-off-by: HUGO AGUD --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index eed466049b..c580c13b88 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -983,6 +983,11 @@ sub _query_regex_escape_process { $query =~ s@(?:(?