Class: Elastify::ElasticSearchHelper::SearchResult
- Inherits:
-
Object
- Object
- Elastify::ElasticSearchHelper::SearchResult
- Defined in:
- lib/elastify/elastic_search_helper.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#index ⇒ Object
Returns the value of attribute index.
-
#score ⇒ Object
Returns the value of attribute score.
-
#source ⇒ Object
Returns the value of attribute source.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(elasticsearch_search_result_hit) ⇒ SearchResult
constructor
A new instance of SearchResult.
Constructor Details
#initialize(elasticsearch_search_result_hit) ⇒ SearchResult
Returns a new instance of SearchResult.
104 105 106 107 108 109 |
# File 'lib/elastify/elastic_search_helper.rb', line 104 def initialize elasticsearch_search_result_hit self.index = elasticsearch_search_result_hit["_index"] self.type = elasticsearch_search_result_hit["_type"] self.id = elasticsearch_search_result_hit["_id"] self.source = elasticsearch_search_result_hit["_source"] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
103 104 105 |
# File 'lib/elastify/elastic_search_helper.rb', line 103 def id @id end |
#index ⇒ Object
Returns the value of attribute index.
103 104 105 |
# File 'lib/elastify/elastic_search_helper.rb', line 103 def index @index end |
#score ⇒ Object
Returns the value of attribute score.
103 104 105 |
# File 'lib/elastify/elastic_search_helper.rb', line 103 def score @score end |
#source ⇒ Object
Returns the value of attribute source.
103 104 105 |
# File 'lib/elastify/elastic_search_helper.rb', line 103 def source @source end |
#type ⇒ Object
Returns the value of attribute type.
103 104 105 |
# File 'lib/elastify/elastic_search_helper.rb', line 103 def type @type end |