Fixed issue #2297 - rake searchindex:rebuild
is not working after Elasticsearch 2.4 upgrade to Elasticsearch 5.6 "Limit of total fields [1000] in index"
This commit is contained in:
parent
e8e0bf93b9
commit
c8ab4275d6
1 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,9 @@ namespace :searchindex do
|
|||
number = info['version']['number'].to_s
|
||||
end
|
||||
|
||||
settings = {
|
||||
'index.mapping.total_fields.limit': 2000,
|
||||
}
|
||||
mapping = {}
|
||||
Models.indexable.each do |local_object|
|
||||
mapping.merge!(get_mapping_properties_object(local_object))
|
||||
|
@ -33,7 +36,8 @@ namespace :searchindex do
|
|||
SearchIndexBackend.index(
|
||||
action: 'create',
|
||||
data: {
|
||||
mappings: mapping
|
||||
mappings: mapping,
|
||||
settings: settings,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue