From cf932c652b9f28c366482f3472a1788f880a0da7 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 23 Jul 2020 14:51:47 +0200 Subject: [PATCH] Bug 26051: Elasticsearch field local-classification sort=1 in mapping.yaml With Elasticsearch the search field use for sorting by callnumber is "local-classification" (from Koha::SearchEngine::Elasticsearch::QueryBuilder::_convert_sort_fields). So this search field must be sortable in default mappings.yaml. If not you see this error in logs : No mapping found for [local-classification__sort] Test plan : 1) Install Koha with Elasticsearch with mappings.yaml from sources (admin/searchengine/elasticsearch/mappings.yaml) 2) Reset mappings 3) Rebuild indexes 4) Perform a search 5) Check sorting by callnumber is OK --- admin/searchengine/elasticsearch/mappings.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/searchengine/elasticsearch/mappings.yaml b/admin/searchengine/elasticsearch/mappings.yaml index b72fe18be4..40b71e81bb 100644 --- a/admin/searchengine/elasticsearch/mappings.yaml +++ b/admin/searchengine/elasticsearch/mappings.yaml @@ -2658,7 +2658,7 @@ biblios: - facet: '' marc_field: 952o marc_type: marc21 - sort: 0 + sort: 1 suggestible: 1 - facet: '' marc_field: 686 @@ -2668,12 +2668,12 @@ biblios: - facet: '' marc_field: 995k marc_type: unimarc - sort: 0 + sort: 1 suggestible: 1 - facet: '' marc_field: 952o marc_type: normarc - sort: 0 + sort: 1 suggestible: 1 type: '' local-number: -- 2.27.0