Class: ROM::Elasticsearch::Relation::Loaded

Inherits:
Relation::Loaded
  • Object
show all
Defined in:
lib/rom/elasticsearch/relation/loaded.rb

Overview

Materialized index data

Instance Method Summary collapse

Instance Method Details

#responseHash

Return raw response from the ES client

Returns:

  • (Hash)


24
25
26
# File 'lib/rom/elasticsearch/relation/loaded.rb', line 24

def response
  source.dataset.options[:response]
end

#total_hitsInteger

Return total number of hits

Returns:

  • (Integer)


15
16
17
# File 'lib/rom/elasticsearch/relation/loaded.rb', line 15

def total_hits
  response['hits']['total']
end