Sha256: 252c0019bd638bb6b765a7a64d83af2a98e335478bdfb4b442bc8f7c774f8851
Contents?: true
Size: 680 Bytes
Versions: 1
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true module Esse module Backend class Index module InstanceMethods # Checks the index existance. Returns true or false # # UsersIndex.elasticsearch.index_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 index_exist?(suffix: index_version) coerce_exception { client.indices.exists(index: index_name(suffix: suffix)) } end end include InstanceMethods end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
esse-0.2.2 | lib/esse/backend/index/existance.rb |