Bugzilla – Attachment 100965 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.54 KB, created by
Bernardo Gonzalez Kriegel
on 2020-03-18 14:32:35 UTC
(
hide
)
Description:
Bug 23204: (follow-up) also sort by marc field
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-03-18 14:32:35 UTC
Size:
1.54 KB
patch
obsolete
>From 8d33012c59b8964c615816a7c7ba87c9a5e1f653 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 > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Same order between runs >--- > 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 87431325ca..5692fdb119 100644 >--- a/Koha/SearchEngine/Elasticsearch.pm >+++ b/Koha/SearchEngine/Elasticsearch.pm >@@ -262,10 +262,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.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 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