Sha256: a0d70b9fc07d0422926237739544e0573b4b6631df070557f7d98be11a6f7304
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true module Esse module Backend class Index module InstanceMethods # Checks the index existance. Returns true or false # # UsersIndex.backend.exist? #=> true # # @param options [Hash] Options hash # @option options [String, nil] :suffix The index suffix. Defaults to the index_version. # Use nil if you want to check existence of the `index_name` index or alias. def exist?(suffix: index_version) name = suffix ? real_index_name(suffix) : index_name client.indices.exists(index: name) end end include InstanceMethods end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
esse-0.0.3 | lib/esse/backend/index/existance.rb |
esse-0.0.2 | lib/esse/backend/index/existance.rb |