mirror of
https://github.com/mastodon/mastodon.git
synced 2025-05-07 04:06:13 +00:00
Fix tootctl search deploy --only-mapping
not updating index settings (#34566)
This commit is contained in:
parent
40157e063d
commit
bd9223f0b9
|
@ -12,6 +12,13 @@ module Chewy
|
|||
base_options.merge(number_of_replicas: 1, number_of_shards: (base_options[:number_of_shards] || 1) * 2)
|
||||
end
|
||||
end
|
||||
|
||||
def update_specification
|
||||
client.indices.close index: index_name
|
||||
client.indices.put_settings index: index_name, body: { settings: { analysis: settings_hash[:settings][:analysis] } }
|
||||
client.indices.put_mapping index: index_name, body: root.mappings_hash
|
||||
client.indices.open index: index_name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ module Mastodon::CLI
|
|||
if options[:only_mapping]
|
||||
indices.select { |index| index.specification.changed? }.each do |index|
|
||||
progress.title = "Updating mapping for #{index} "
|
||||
index.update_mapping
|
||||
index.update_specification
|
||||
index.specification.lock!
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user