Bugzilla – Attachment 166251 Details for
Bug 36396
Link facet with authorised value category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36396: Export/import the yaml config
Bug-36396-Exportimport-the-yaml-config.patch (text/plain), 2.61 KB, created by
Martin Renvoize (ashimema)
on 2024-05-07 10:21:40 UTC
(
hide
)
Description:
Bug 36396: Export/import the yaml config
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-07 10:21:40 UTC
Size:
2.61 KB
patch
obsolete
>From 2ae046e6cba644e31148703933217d2988ac2822 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 Mar 2024 10:04:08 +0100 >Subject: [PATCH] Bug 36396: Export/import the yaml config > >Test plan: >Export the ES fields/mappings using > misc/search_tools/export_elasticsearch_mappings.pl > mappings.yaml >Copy this file to admin/searchengine/elasticsearch/mappings.yaml > >Reset the mapping from the UI >Notice that the links to the AV categories have been preserved > >Sponsored-by: The Research University in the Helmholtz Association (KIT) >Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/SearchEngine/Elasticsearch.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index 5989e8ce4f9..531d410e5b7 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -288,6 +288,9 @@ sub raw_elasticsearch_mappings { > $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type; > $mappings->{ $marc_map->index_name }{ $search_field->name }{mandatory} = $search_field->mandatory; > $mappings->{ $marc_map->index_name }{ $search_field->name }{facet_order} = $search_field->facet_order if defined $search_field->facet_order; >+ $mappings->{ $marc_map->index_name }{ $search_field->name }{authorised_value_category} = >+ $search_field->authorised_value_category >+ if defined $search_field->authorised_value_category; > $mappings->{ $marc_map->index_name }{ $search_field->name }{weight} = $search_field->weight if defined $search_field->weight; > $mappings->{ $marc_map->index_name }{ $search_field->name }{opac} = $search_field->opac if defined $search_field->opac; > $mappings->{ $marc_map->index_name }{ $search_field->name }{staff_client} = $search_field->staff_client if defined $search_field->staff_client; >@@ -368,7 +371,7 @@ sub reset_elasticsearch_mappings { > while ( my ( $index_name, $fields ) = each %$indexes ) { > while ( my ( $field_name, $data ) = each %$fields ) { > >- my %sf_params = map { $_ => $data->{$_} } grep { exists $data->{$_} } qw/ type label weight staff_client opac facet_order mandatory/; >+ my %sf_params = map { $_ => $data->{$_} } grep { exists $data->{$_} } qw/ type label weight staff_client opac facet_order authorised_value_category mandatory/; > > # Set default values > $sf_params{staff_client} //= 1; >-- >2.45.0
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 36396
:
163685
|
163686
|
163687
|
163688
|
163689
|
163690
|
163705
|
163776
|
163777
|
163778
|
163779
|
163780
|
163781
|
163782
|
166246
|
166247
|
166248
|
166249
|
166250
| 166251 |
166252
|
166254
|
166258