From 1ea9aac1085fae84de0f9c7341d0efef0562da81 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 27 Apr 2020 14:05:46 +0000 Subject: [PATCH] Bug 25278: (follow-up) Fix other occurrences Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- admin/searchengine/elasticsearch/mappings.pl | 6 ++++-- .../Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 6 ++++-- t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl index 125988202f..6780041839 100755 --- a/admin/searchengine/elasticsearch/mappings.pl +++ b/admin/searchengine/elasticsearch/mappings.pl @@ -166,8 +166,10 @@ if ( $op eq 'edit' ) { $schema->storage->txn_commit; my $cache = Koha::Caches->get_instance(); - $cache->clear_from_cache('elasticsearch_search_fields_staff_client'); - $cache->clear_from_cache('elasticsearch_search_fields_opac'); + $cache->clear_from_cache('elasticsearch_search_fields_staff_client_biblios'); + $cache->clear_from_cache('elasticsearch_search_fields_opac_biblios'); + $cache->clear_from_cache('elasticsearch_search_fields_staff_client_authorities'); + $cache->clear_from_cache('elasticsearch_search_fields_opac_authorities'); $update_mappings->(); } diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t index d1e5a5cab3..a3ff646bad 100644 --- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t +++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t @@ -103,8 +103,10 @@ $se->mock( 'get_elasticsearch_mappings', sub { my $cache = Koha::Caches->get_instance(); my $clear_search_fields_cache = sub { - $cache->clear_from_cache('elasticsearch_search_fields_staff_client'); - $cache->clear_from_cache('elasticsearch_search_fields_opac'); + $cache->clear_from_cache('elasticsearch_search_fields_staff_client_biblios'); + $cache->clear_from_cache('elasticsearch_search_fields_opac_biblios'); + $cache->clear_from_cache('elasticsearch_search_fields_staff_client_authorities'); + $cache->clear_from_cache('elasticsearch_search_fields_opac_authorities'); }; subtest 'build_authorities_query_compat() tests' => sub { diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t index dc8e29a4d8..0c07a260d6 100644 --- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t +++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t @@ -73,5 +73,7 @@ is($title_sf->weight, '20.00', 'Title search field is weighted with 20'); $schema->storage->txn_rollback; $cache = Koha::Caches->get_instance(); -$cache->clear_from_cache('elasticsearch_search_fields_staff_client'); -$cache->clear_from_cache('elasticsearch_search_fields_opac'); +$cache->clear_from_cache('elasticsearch_search_fields_staff_client_biblios'); +$cache->clear_from_cache('elasticsearch_search_fields_opac_biblios'); +$cache->clear_from_cache('elasticsearch_search_fields_staff_client_authorities'); +$cache->clear_from_cache('elasticsearch_search_fields_opac_authorities'); -- 2.39.5