Class: ROM::Elasticsearch::Relation::Loaded
- Inherits:
-
Relation::Loaded
- Object
- Relation::Loaded
- ROM::Elasticsearch::Relation::Loaded
- Defined in:
- lib/rom/elasticsearch/relation/loaded.rb
Overview
Materialized index data
Instance Method Summary collapse
-
#response ⇒ Hash
Return raw response from the ES client.
-
#total_hits ⇒ Integer
Return total number of hits.
Instance Method Details
#response ⇒ Hash
Return raw response from the ES client
24 25 26 |
# File 'lib/rom/elasticsearch/relation/loaded.rb', line 24 def response source.dataset.[:response] end |
#total_hits ⇒ Integer
Return total number of hits
15 16 17 |
# File 'lib/rom/elasticsearch/relation/loaded.rb', line 15 def total_hits response["hits"]["total"]["value"] end |