From 34bb69dd99b51c56d603abdfd2f571cb794b8961 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 8 Jan 2021 13:13:48 +0000 Subject: [PATCH] Bug 27316: (follow-up) Default to 1 if undef in mappings Signed-off-by: Fridolin Somers Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit e1d85738cca1acb0f2b1617d5607bfd644cb7b99) Signed-off-by: Fridolin Somers --- Koha/SearchEngine/Elasticsearch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 4a2d75d03d..27b33806c9 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -374,7 +374,7 @@ sub reset_elasticsearch_mappings { $search_field->add_to_search_marc_maps($marc_field, { facet => $mapping->{facet} || 0, suggestible => $mapping->{suggestible} || 0, - sort => $mapping->{sort}, + sort => $mapping->{sort} // 1, search => $mapping->{search} // 1 }); } -- 2.39.5