Method: Elasticsearch::Model::Response::Records#map_with_hit

Defined in:
lib/elasticsearch/model/response/records.rb

#map_with_hit(&block) ⇒ Object

Yields [record, hit] pairs and returns the result



70
71
72
# File 'lib/elasticsearch/model/response/records.rb', line 70

def map_with_hit(&block)
  records.to_a.zip(results).map(&block)
end