class Esse::Backend::IndexType

Public Class Methods

new(type) click to toggle source
# File lib/esse/backend/index_type.rb, line 15
def initialize(type)
  @index_type = type
end

Protected Instance Methods

client() click to toggle source
# File lib/esse/backend/index_type.rb, line 32
def client
  index_class.cluster.client
end
index_class() click to toggle source
# File lib/esse/backend/index_type.rb, line 28
def index_class
  @index_type.index
end
index_name(suffix: nil) click to toggle source
# File lib/esse/backend/index_type.rb, line 21
def index_name(suffix: nil)
  suffix = Hstring.new(suffix).underscore.presence
  return index_class.index_name unless suffix

  [index_class.index_name, suffix].join('_')
end