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:



13
14
15
# File 'lib/esearch/index.rb', line 13

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:



23
24
25
# File 'lib/esearch/index.rb', line 23

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



33
34
35
# File 'lib/esearch/index.rb', line 33

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)


55
56
57
# File 'lib/esearch/index.rb', line 55

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:



45
46
47
# File 'lib/esearch/index.rb', line 45

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