Bugzilla – Attachment 95986 Details for
Bug 23204
Add script for exporting Elasticsearch mappings to YAML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23204: (follow-up) also sort by marc field
Bug-23204-follow-up-also-sort-by-marc-field.patch (text/plain), 1.46 KB, created by
Fridolin Somers
on 2019-12-04 08:39:45 UTC
(
hide
)
Description:
Bug 23204: (follow-up) also sort by marc field
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2019-12-04 08:39:45 UTC
Size:
1.46 KB
patch
obsolete
>From 286e1709f917f9a8156893056bf91bb6c347c479 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 12 Nov 2019 17:15:14 +0100 >Subject: [PATCH] Bug 23204: (follow-up) also sort by marc field > >Test plan : >Launching script several times and see that marc field is alway ordered increasing >--- > Koha/SearchEngine/Elasticsearch.pm | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm >index b5dedaad4b..e696a8cee3 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -260,10 +260,17 @@ sub raw_elasticsearch_mappings { > my $mappings = {}; > while ( my $search_field = $search_fields->next ) { > >- my $marc_to_fields = $schema->resultset('SearchMarcToField')->search( { search_field_id => $search_field->id } ); >+ my $marc_to_fields = $schema->resultset('SearchMarcToField')->search( >+ { search_field_id => $search_field->id }, >+ { >+ join => 'search_marc_map', >+ order_by => { -asc => 'search_marc_map.marc_field' } >+ } >+ ); > > while ( my $marc_to_field = $marc_to_fields->next ) { >- my $marc_map = Koha::SearchMarcMaps->find( $marc_to_field->search_marc_map_id ); >+ >+ my $marc_map = $marc_to_field->search_marc_map; > > next if $marc_type && $marc_map->marc_type ne $marc_type; > >-- >2.24.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 23204
:
90999
|
91350
|
92022
|
92023
|
92024
|
92174
|
93524
|
95986
|
100960
|
100961
|
100962
|
100963
|
100964
|
100965
|
101742
|
101850
|
101851
|
101852
|
101853
|
101854
|
101855
|
101856
|
101857
|
101858
|
102010