lib/searchkick/index_options.rb in searchkick-2.0.0 vs lib/searchkick/index_options.rb in searchkick-2.0.1
- old
+ new
@@ -250,19 +250,11 @@
fields[type] = {type: default_type, index: "analyzed", analyzer: "searchkick_#{type}_index"}
end
end
end
- mapping[field] =
- if below50
- {
- type: "multi_field",
- fields: fields
- }
- elsif fields[field]
- fields[field].merge(fields: fields.except(field))
- end
+ mapping[field] = fields[field].merge(fields: fields.except(field))
end
(options[:locations] || []).map(&:to_s).each do |field|
mapping[field] = {
type: "geo_point"
@@ -305,18 +297,10 @@
dynamic_fields["analyzed"] = {type: default_type, index: "analyzed"}
end
end
# http://www.elasticsearch.org/guide/reference/mapping/multi-field-type/
- multi_field =
- if below50
- {
- type: "multi_field",
- fields: dynamic_fields
- }
- else
- dynamic_fields["{name}"].merge(fields: dynamic_fields.except("{name}"))
- end
+ multi_field = dynamic_fields["{name}"].merge(fields: dynamic_fields.except("{name}"))
all_enabled = !options[:searchable] || options[:searchable].to_a.include?("_all")
mappings = {
_default_: {