Bugzilla – Attachment 104897 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: Retrieve correct search fields for authorities
Bug-25278-Retrieve-correct-search-fields-for-autho.patch (text/plain), 2.04 KB, created by
Victor Grousset/tuxayo
on 2020-05-14 19:06:26 UTC
(
hide
)
Description:
Bug 25278: Retrieve correct search fields for authorities
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2020-05-14 19:06:26 UTC
Size:
2.04 KB
patch
obsolete
>From 34adb3041b3411001928247c9882e7da76e3b7f3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 24 Apr 2020 15:52:50 +0000 >Subject: [PATCH] Bug 25278: Retrieve correct search fields for authorities > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > Koha/SearchEngine/Elasticsearch.pm | 6 ++++-- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index b6b3be0111..7afb9aab54 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -383,8 +383,10 @@ sub reset_elasticsearch_mappings { > } > > 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'); > > # FIXME return the mappings? > } >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 1bbbf079b8..871f81d027 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -1139,7 +1139,7 @@ sub _search_fields { > subfield => undef, > }; > my $cache = Koha::Caches->get_instance(); >- my $cache_key = 'elasticsearch_search_fields' . ($params->{is_opac} ? '_opac' : '_staff_client'); >+ my $cache_key = 'elasticsearch_search_fields' . ($params->{is_opac} ? '_opac' : '_staff_client') . "_" . $self->index; > my $search_fields = $cache->get_from_cache($cache_key, { unsafe => 1 }); > if (!$search_fields) { > # The reason we don't use Koha::SearchFields->search here is we don't >-- >2.26.2
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