Module: Esearch::Mixin::Document

Included in:
Document, Type
Defined in:
lib/esearch/mixin.rb

Overview

Mixin that adds document operations

Instance Method Summary collapse

Instance Method Details

#index(document, options = {}) ⇒ Presenter::Document::Operation::Index

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.

Index document

Parameters:

  • document (Document)
  • options (Hash) (defaults to: {})

Returns:



36
37
38
# File 'lib/esearch/mixin.rb', line 36

def index(document, options = {})
  Command::Document::Index.run(self, document, options)
end

#index_create(document, options = {}) ⇒ Presenter::Document::Operation::Index

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.

Create indexed document

Parameters:

  • document (Document)
  • options (Hash) (defaults to: {})

Returns:



49
50
51
# File 'lib/esearch/mixin.rb', line 49

def index_create(document, options = {})
  Command::Document::Index::Create.run(self, document, options)
end

#index_update(document, options = {}) ⇒ Presenter::Document::Operation::Index

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.

Update indexed document

Parameters:

  • document (Document)
  • options (Hash) (defaults to: {})

Returns:



62
63
64
# File 'lib/esearch/mixin.rb', line 62

def index_update(document, options = {})
  Command::Document::Index::Update.run(self, document, options)
end