Bugzilla – Attachment 104946 Details for
Bug 25278
Search fields cache must be separate for different indexes under Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25278: (follow-up) Fix other occurrences
Bug-25278-follow-up-Fix-other-occurrences.patch (text/plain), 3.35 KB, created by
Jonathan Druart
on 2020-05-15 13:18:31 UTC
(
hide
)
Description:
Bug 25278: (follow-up) Fix other occurrences
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-15 13:18:31 UTC
Size:
3.35 KB
patch
obsolete
>From ed4f36e9dcae9e3eccba43ae309cbc440f411b12 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 27 Apr 2020 14:05:46 +0000 >Subject: [PATCH] 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> >--- > 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 9b1c8cce58..5212c2a5cb 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.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25278
:
103697
|
103699
|
103700
|
103793
|
104896
|
104897
|
104898
|
104939
|
104944
|
104945
| 104946 |
104947