From 6d6e10ee4b2d6d5fbc8567638ba2bdb29ad29e36 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 1 Mar 2017 14:30:11 +0000 Subject: [PATCH] Bug 18189 - Elasticsearch sorting broken To test: 1 - Have ES enabled and biblios and authorities indexed 2 - Perform a catalog search 3 - Try to sort results by author, it will fail 4 - Perform an authority search with sorting enabled, it will fail 5 - Apply patch 6 - Reindex, deleting current indexes perl /home/vagrant/kohaclone/misc/search_tools/rebuild_elastic_search.pl -d -v 7 - Repeat 3&4, they should succeed --- Koha/SearchEngine/Elasticsearch.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 03cc5c3..e60908c 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -224,9 +224,7 @@ sub get_elasticsearch_mappings { include_in_all => JSON::false, fields => { phrase => { - search_analyzer => "analyser_phrase", - analyzer => "analyser_phrase", - type => "text", + type => "keyword", }, }, }; -- 2.1.4