From 70377b375794dffa4ff18bd9b7a7f37060cf295c 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 Signed-off-by: Srdjan Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- 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 b83864034c..1fd8bc1465 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.11.4.GIT