@@ -, +, @@ copy_to 1) apply this patch, 2) update your elasticsearch server to the version 6 (6.2?), 3) reinstall icu plugin, 4) reindex your authorities and biblios, 5) check that there is no error in /var/log/elasticsearch/elasticsearch.log, 6) try a search on biblios, 7) check that facet work, 8) try a search on authorities --- Koha/SearchEngine/Elasticsearch.pm | 6 ++++++ Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) --- a/Koha/SearchEngine/Elasticsearch.pm +++ a/Koha/SearchEngine/Elasticsearch.pm @@ -176,8 +176,13 @@ sub get_elasticsearch_mappings { properties => { record => { store => "true", + copy_to => "_all_fields", type => "text", }, + _all_fields => { + type => "text", + analyzer => "analyser_standard" + }, } } }; @@ -224,6 +229,7 @@ sub get_elasticsearch_mappings { search_analyzer => "analyser_phrase", analyzer => "analyser_phrase", type => "text", + copy_to => "_all_fields", fields => { phrase => { type => "keyword", --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -90,6 +90,7 @@ sub build_query { query => $query, fuzziness => $fuzzy_enabled ? 'auto' : '0', default_operator => 'AND', + default_field => '_all_fields', lenient => JSON::true, } }; @@ -292,7 +293,7 @@ sub build_authorities_query { my @filter_parts; foreach my $s ( @{ $search->{searches} } ) { my ( $wh, $op, $val ) = @{$s}{qw(where operator value)}; - $wh = '_all' if $wh eq ''; + $wh = '_all_fields' if $wh eq ''; if ( $op eq 'is' || $op eq '=' ) { # look for something that matches completely @@ -512,7 +513,7 @@ types. =cut our %index_field_convert = ( - 'kw' => '', + 'kw' => '_all_fields', 'ti' => 'title', 'au' => 'author', 'su' => 'subject', --