lib/esse/backend/index/close.rb in esse-0.0.3 vs lib/esse/backend/index/close.rb in esse-0.0.4
- old
+ new
@@ -19,12 +19,10 @@
# in case of failure
# @return [Hash] the elasticsearch response
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
def close!(suffix: index_version, **options)
- name = suffix ? real_index_name(suffix) : index_name
-
- client.indices.close(options.merge(index: name))
+ client.indices.close(options.merge(index: index_name(suffix: suffix)))
end
# Close an index (keep the data on disk, but deny operations with the index).
#
# @option options [String, nil] :suffix The index suffix. Defaults to the index_version.