From d489d79148b2876f2b02e6731760eb9378c95af4 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Thu, 3 Oct 2019 07:23:07 +0000 Subject: [PATCH] Bug 23204: sort search fields by name Signed-off-by: Bernardo Gonzalez Kriegel --- Koha/SearchEngine/Elasticsearch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index b18d05bddf..87431325ca 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -257,7 +257,7 @@ sub raw_elasticsearch_mappings { my $schema = Koha::Database->new()->schema(); - my $search_fields = Koha::SearchFields->search(); + my $search_fields = Koha::SearchFields->search({}, { order_by => { -asc => 'name' } }); my $mappings = {}; while ( my $search_field = $search_fields->next ) { -- 2.17.1