Class: Esearch::Document

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

Overview

Handler for document

Instance Method Summary collapse

Methods included from Mixin::Exist

#exist?

Methods included from Mixin::Document

#index, #index_create, #index_update

Instance Method Details

#connectionConnection

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:



50
51
52
# File 'lib/esearch/document.rb', line 50

def connection
  type.connection
end

#deletePresenter::Command::Document::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 document

Returns:

  • (Presenter::Command::Document::Delete)


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

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

#getPresenter::Command::Document::Get?

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

Returns:

  • (Presenter::Command::Document::Get)

    if foundd

  • (nil)

    otherwise



29
30
31
# File 'lib/esearch/document.rb', line 29

def get
  Command::Document::Get.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)


39
40
41
# File 'lib/esearch/document.rb', line 39

def path
  type.path.join(id)
end