Class: Esearch::Command
- Inherits:
-
Object
- Object
- Esearch::Command
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/esearch/command.rb,
lib/esearch/command/exist.rb,
lib/esearch/command/index.rb,
lib/esearch/command/search.rb,
lib/esearch/command/status.rb,
lib/esearch/command/cluster.rb,
lib/esearch/command/document.rb
Overview
Abstract base class for elasticsearch commands
Defined Under Namespace
Classes: Cluster, Document, Exist, Index, Search, Status
Constant Summary collapse
- EXPECTED_STATI =
[ 200 ].freeze
- JSON_CONTENT_TYPE =
'application/json; charset=UTF-8'.freeze
Class Method Summary collapse
-
.run(*args) ⇒ Object
private
Run command.
Instance Method Summary collapse
-
#result ⇒ Presenter
private
Return result of request.
Class Method Details
.run(*args) ⇒ Object
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.
Run command
15 16 17 |
# File 'lib/esearch/command.rb', line 15 def self.run(*args) new(*args).result end |
Instance Method Details
#result ⇒ Presenter
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 result of request
25 26 27 28 |
# File 'lib/esearch/command.rb', line 25 def result assert_success presenter.new(parsed_json) end |