Bugzilla – Attachment 163781 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.55 KB, created by
Lukas Koszyk
on 2024-03-25 10:10:53 UTC
(
hide
)
Description:
Bug 36396: Export/import the yaml config
Filename:
MIME Type:
Creator:
Lukas Koszyk
Created:
2024-03-25 10:10:53 UTC
Size:
2.55 KB
patch
obsolete
>From cb4fac61add250d178104013b3e23be3b74dbdbc 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> >--- > 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 cb0be0e86e..8e226dcc2b 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -282,6 +282,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; >@@ -362,7 +365,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.30.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 36396
:
163685
|
163686
|
163687
|
163688
|
163689
|
163690
|
163705
|
163776
|
163777
|
163778
|
163779
|
163780
|
163781
|
163782
|
166246
|
166247
|
166248
|
166249
|
166250
|
166251
|
166252
|
166254
|
166258