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)


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

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:



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

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)


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

def path
  es_index.path.join(name)
end