From d9790adda00d96b793d1170350bf534b2143b25a Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 1 Mar 2018 04:09:29 -0800 Subject: [PATCH] Disable _all field by default in ES 5 [skip ci] --- CHANGELOG.md | 1 + lib/searchkick/index_options.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4964a79..67b807b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Removed `reindex_async` method. `reindex` now defaults to mode specified by model. Use `reindex(mode: :async)` to force async reindex. - Types are no longer supported. To upgrade models that use inheritance, upgrade your gem to `2.5.0`. Added `inheritance: true` to your `searchkick` method, and do a full reindex before upgrading. - Bumped default `limit` to 10,000 +- The `_all` field is disabled by default in Elasticsearch 5. Use `searchkick _all: true` if you need it. ## 2.5.1 [unreleased] diff --git a/lib/searchkick/index_options.rb b/lib/searchkick/index_options.rb index 91cfb35..0c2a783 100644 --- a/lib/searchkick/index_options.rb +++ b/lib/searchkick/index_options.rb @@ -16,7 +16,7 @@ module Searchkick default_analyzer = :searchkick_index keyword_mapping = {type: "keyword"} - all = options.key?(:_all) ? options[:_all] : below60 + all = options.key?(:_all) ? options[:_all] : false index_true_value = true index_false_value = false -- libgit2 0.21.0