Class: Esearch::Presenter::Hit
- Inherits:
-
Esearch::Presenter
- Object
- Esearch::Presenter
- Esearch::Presenter::Hit
- Defined in:
- lib/esearch/presenter/hit.rb
Overview
Presenter for an hit
Instance Method Summary collapse
-
#_id ⇒ String
private
Return id.
-
#_index ⇒ String
private
Return index name.
-
#_score ⇒ Float
private
Return score.
-
#_type ⇒ Type
private
Return type name.
-
#fields ⇒ Hash?
private
Return fields if present.
-
#source ⇒ Hash?
private
Return source field if present.
Instance Method Details
#_id ⇒ String
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 id
59 |
# File 'lib/esearch/presenter/hit.rb', line 59 expose_primitive(:_id, :id) |
#_index ⇒ String
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 index name
43 |
# File 'lib/esearch/presenter/hit.rb', line 43 expose_primitive(:_index, :index_name) |
#_score ⇒ Float
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 score
67 |
# File 'lib/esearch/presenter/hit.rb', line 67 expose_primitive(:_score, :score) |
#_type ⇒ Type
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 type name
51 |
# File 'lib/esearch/presenter/hit.rb', line 51 expose_primitive(:_type, :type_name) |
#fields ⇒ Hash?
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 fields if present
33 34 35 |
# File 'lib/esearch/presenter/hit.rb', line 33 def fields raw['fields'] end |
#source ⇒ Hash?
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 source field if present
19 20 21 |
# File 'lib/esearch/presenter/hit.rb', line 19 def source raw['_source'] end |