Method: Elasticated::Results#sources

Defined in:
lib/elasticated/results.rb

#sources(with_ids = true) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/elasticated/results.rb', line 47

def sources(with_ids=true)
  documents.map do |d|
    d.source.tap do |s|
      s[:_id] = d.id if with_ids
    end
  end
end