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:



38
39
40
# File 'lib/esearch/mixin.rb', line 38

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:



51
52
53
# File 'lib/esearch/mixin.rb', line 51

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:



64
65
66
# File 'lib/esearch/mixin.rb', line 64

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