Browse Source

Bug 25278: (follow-up) Fix other occurrences

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Nick Clemens 1 year ago
committed by Martin Renvoize
parent
commit
0899d99b7c
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 6
      admin/searchengine/elasticsearch/mappings.pl
  2. 6
      t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t
  3. 6
      t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t

6
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->();
}

6
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 {

6
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');
Loading…
Cancel
Save