Method: Elastictastic::MultiGet#each

Defined in:
lib/elastictastic/multi_get.rb

#eachObject



21
22
23
24
25
26
# File 'lib/elastictastic/multi_get.rb', line 21

def each
  return if @docspecs.empty?
  Elastictastic.client.mget(@docspecs)['docs'].zip(@scopes) do |hit, scope|
    yield scope.materialize_hit(hit) if hit['exists']
  end
end