@@ -, +, @@ for biblios only) 1) apply this patch, 2) update your elasticsearch server to the version 6 (6.2?), 3) reinstall icu plugin, 4) reindex your authoroties 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 --- Koha/SearchEngine/Elasticsearch.pm | 9 ++++----- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) --- a/Koha/SearchEngine/Elasticsearch.pm +++ a/Koha/SearchEngine/Elasticsearch.pm @@ -173,11 +173,9 @@ sub get_elasticsearch_mappings { # TODO cache in the object? my $mappings = { data => { - _all => {type => "string", analyzer => "analyser_standard"}, properties => { record => { store => "true", - include_in_all => JSON::false, type => "text", }, } @@ -226,7 +224,6 @@ sub get_elasticsearch_mappings { search_analyzer => "analyser_phrase", analyzer => "analyser_phrase", type => "text", - include_in_all => JSON::false, fields => { phrase => { type => "keyword", @@ -254,7 +251,7 @@ sub _elasticsearch_mapping_for_boolean { return { type => $type, - null_value => 0, + null_value => 'false', }; } @@ -344,7 +341,9 @@ sub get_fixer_rules { # boolean gets special handling, basically if it doesn't exist, # it's added and set to false. Otherwise we can't query it. push @rules, - "unless exists('$name') add_field('$name', 0) end"; + "unless exists('$name') add_field('$name', 'false') end"; + push @rules, + "if exists('$name') add_field('$name', 'true') end"; } if ($type eq 'sum' ) { push @rules, "sum('$name')"; --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -90,7 +90,6 @@ sub build_query { query => $query, fuzziness => $fuzzy_enabled ? 'auto' : '0', default_operator => 'AND', - default_field => '_all', lenient => JSON::true, } }; @@ -513,7 +512,7 @@ types. =cut our %index_field_convert = ( - 'kw' => '_all', + 'kw' => '', 'ti' => 'title', 'au' => 'author', 'su' => 'subject', --