From c338829aba6f244fb50fe2cc8d98f72dde531ae5 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 Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- 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 0863faf307..850a4373d1 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -258,7 +258,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.39.5