Class: Esearch::Index

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat, Mixin::Exist, Mixin::Index, Mixin::Search
Defined in:
lib/esearch/index.rb

Overview

Driver for specific index

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Exist

#exist?

Methods included from Mixin::Search

#search

Methods included from Mixin::Index

#refresh, #status

Instance Attribute Details

#connectionConnection (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return connection

Returns:



15
16
17
# File 'lib/esearch/index.rb', line 15

def connection
  @connection
end

Instance Method Details

#create(settings) ⇒ Presenter::Index::Create

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Cretate remote index

Parameters:

  • settings (Hash)

Returns:



25
26
27
# File 'lib/esearch/index.rb', line 25

def create(settings)
  Command::Index::Create.run(self, settings)
end

#deletePresenter::Index::Delete

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Delete remote index



35
36
37
# File 'lib/esearch/index.rb', line 35

def delete
  Command::Index::Delete.run(self)
end

#pathPathname

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return path

Returns:

  • (Pathname)


57
58
59
# File 'lib/esearch/index.rb', line 57

def path
  Pathname.new("/#{name}")
end

#type(name) ⇒ Type

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return type for index

Parameters:

  • name (String)

Returns:



47
48
49
# File 'lib/esearch/index.rb', line 47

def type(name)
  Type.new(self, name)
end