From 4983f6e9d4c52c6a5b0e773eea9aa4ed69319cff 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 --- 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 b838640..1fd8bc1 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.9.3