From 15cac44526c4cdce4a0b1187acebadf32131a316 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 15 May 2017 12:11:30 -0300 Subject: [PATCH] Bug 18610: Make facet indexing append instead of overwrite so it works on newer Catmandu This patch makes get_fixer_rules add the $append string to the facets mapping as we did for bug 18434. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t t/db_dependent/Koha_Elasticsearch.t => FAIL: Tests fail! - Apply this patch - Run: k$ prove t/db_dependent/Koha_Elasticsearch_Indexer.t t/db_dependent/Koha_Elasticsearch.t => SUCCESS: Tests are all green! - Sign off :-D Sponsored-by: ByWater Solutions --- 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 b079dca..3a0fd57 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -328,7 +328,7 @@ sub get_fixer_rules { $options = '-split => 1' unless $marc_field =~ m|_/| || $type eq 'sum'; push @rules, "marc_map('$marc_field','${name}.\$append', $options)"; if ($facet) { - push @rules, "marc_map('$marc_field','${name}__facet', $options)"; + push @rules, "marc_map('$marc_field','${name}__facet.\$append', $options)"; } if ($suggestible) { push @rules, -- 2.7.4