Bugzilla – Attachment 104004 Details for
Bug 25325
ElasticSearch mapping export lacks staff_client/opac fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25325 ElasticSearch mapping export lacks staff_client/opac fields
Bug-25325-ElasticSearch-mapping-export-lacks-staff.patch (text/plain), 2.76 KB, created by
Frédéric Demians
on 2020-04-30 05:59:15 UTC
(
hide
)
Description:
Bug 25325 ElasticSearch mapping export lacks staff_client/opac fields
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2020-04-30 05:59:15 UTC
Size:
2.76 KB
patch
obsolete
>From 88a2524833e16587e8f8ff42de95249fe851d6aa Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Thu, 30 Apr 2020 07:51:14 +0200 >Subject: [PATCH] Bug 25325 ElasticSearch mapping export lacks > staff_client/opac fields > >Add to export_elasticsearch_mappings.pl two missing fields: staff_client >and opac. > >Test plan: > >1. Run export_elasticsearch_mappings.pl script. Write the result in > mappings.yaml (the one defined in koha-conf.xml). >2. In Admin > Search engine configuration, click on Reset Mappings >3. Confirm that in Search fields tab, the Searchable column hasn't > changed. >--- > Koha/SearchEngine/Elasticsearch.pm | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index 6616671325..4b92c7de1f 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -273,25 +273,26 @@ sub raw_elasticsearch_mappings { > ); > > while ( my $marc_to_field = $marc_to_fields->next ) { >- > my $marc_map = $marc_to_field->search_marc_map; > > next if $marc_type && $marc_map->marc_type ne $marc_type; > >- $mappings->{ $marc_map->index_name }{ $search_field->name }{label} = $search_field->label; >- $mappings->{ $marc_map->index_name }{ $search_field->name }{type} = $search_field->type; >- $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 }{weight} = $search_field->weight if defined $search_field->weight; >+ my $field = $mappings->{ $marc_map->index_name }->{ $search_field->name } = {}; >+ $field->{label} = $search_field->label; >+ $field->{type} = $search_field->type; >+ $field->{facet_order} = $search_field->facet_order if defined $search_field->facet_order; >+ $field->{weight} = $search_field->weight if defined $search_field->weight; >+ $field->{opac} = $search_field->opac if defined $search_field->opac; >+ $field->{staff_client} = $search_field->staff_client if defined $search_field->staff_client; > >- push (@{ $mappings->{ $marc_map->index_name }{ $search_field->name }{mappings} }, >+ push @{ $field->{mappings} }, > { > facet => $marc_to_field->facet || '', > marc_type => $marc_map->marc_type, > marc_field => $marc_map->marc_field, > sort => $marc_to_field->sort, > suggestible => $marc_to_field->suggestible || '' >- }); >- >+ }; > } > } > >-- >2.17.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 25325
:
104004
|
104063
|
104376
|
104377
|
104451
|
104452
|
104482
|
104483