Class: Esearch::Type

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

Overview

Interface to a specific elasticsearch type

Instance Method Summary collapse

Methods included from Mixin::Exist

#exist?

Methods included from Mixin::Document

#index, #index_create, #index_update

Methods included from Mixin::Search

#search

Instance Method Details

#connectionFaraday::Connection

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:

  • (Faraday::Connection)


27
28
29
# File 'lib/esearch/type.rb', line 27

def connection
  es_index.connection
end

#document(id) ⇒ Document

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 document handler

Parameters:

  • id (String)

Returns:



17
18
19
# File 'lib/esearch/type.rb', line 17

def document(id)
  Document.new(self, id)
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)


37
38
39
# File 'lib/esearch/type.rb', line 37

def path
  es_index.path.join(name)
end