From d1615fcda3c2317ddfceb4dadf8e92ee96d839bb 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 --- 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 623f166..8f4d1c3 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -255,7 +255,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.7.4