lib/searchkick/index_options.rb in searchkick-1.5.0 vs lib/searchkick/index_options.rb in searchkick-1.5.1
- old
+ new
@@ -334,12 +334,15 @@
}
else
dynamic_fields["{name}"].merge(fields: dynamic_fields.except("{name}"))
end
+ # TODO make dynamic
+ all_enabled = true
+
mappings = {
_default_: {
- _all: {type: default_type, index: "analyzed", analyzer: default_analyzer},
+ _all: all_enabled ? {type: default_type, index: "analyzed", analyzer: default_analyzer} : {enabled: false},
properties: mapping,
_routing: routing,
# https://gist.github.com/kimchy/2898285
dynamic_templates: [
{