From efe300993c8ff5efd08dac0cbbfad492aad6a214 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Tue, 31 Mar 2015 17:26:49 +1300 Subject: [PATCH] Bug 12478: fix wrong counts/results for authority searches Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index 62d08148ba..f7c2ba2aca 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -260,7 +260,6 @@ The search description is a hashref that looks something like: sub build_authorities_query { my ($self, $search) = @_; -warn "Search is " . Dumper $search; # Start by making the query parts my @query_parts; my @filter_parts; @@ -637,6 +636,9 @@ sub _clean_search_term { $term = $self->_convert_index_strings_freeform($term); $term =~ s/[{}]/"/g; + # Some hardcoded searches (like with authorities) produce things like + # 'an=123', when it ought to be 'an:123'. + $term =~ s/=/:/g; return $term; } -- 2.39.5