From b572b30937fe606a82d31d5f19c45262939e57e5 Mon Sep 17 00:00:00 2001 From: Johanna Raisa Date: Wed, 20 Mar 2019 12:24:18 +0200 Subject: [PATCH] Bug 22545: C4::Matcher::get_matches aggressive isbn and issn search don't give any results with ES TEST PLAN: - Use Elastic as search engine - Turn off UseQueryParser systempreference - Turn on AggressiveMatchOnISBN systempreference - Stage records with ISBN rule - See that there are no matches - Apply the patch - Stage records again - See that matches are found --- C4/Matcher.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Matcher.pm b/C4/Matcher.pm index dc848048c1..c19115b50d 100644 --- a/C4/Matcher.pm +++ b/C4/Matcher.pm @@ -653,7 +653,7 @@ sub get_matches { #NOTE: The QueryParser can't handle the CCL syntax of 'qualifier','qualifier', so fallback to non-QueryParser. #NOTE: You can see this in C4::Search::SimpleSearch() as well in a different way. - if ($QParser && $matchpoint->{'index'} !~ m/\w,\w/) { + if (($QParser && $matchpoint->{'index'} !~ m/\w,\w/) || C4::Context->preference('SearchEngine') eq 'Elasticsearch') { $query = join( " || ", map { "$matchpoint->{'index'}:$_" } @source_keys ); } -- 2.17.1