lib/endeca/document_collection.rb in primedia-endeca-0.9.11 vs lib/endeca/document_collection.rb in primedia-endeca-0.9.12

- old
+ new

@@ -60,10 +60,10 @@ # The internal collection of Document objects. Array methods are delegated here. def documents if @raw['Records'] @documents ||= @raw['Records'].map(&@document_klass) elsif @raw['AggrRecords'] - @documents ||= @raw['AggrRecords']['Records'].map(&@document_klass) + @documents ||= @raw['AggrRecords'].map{|aggregate| aggregate['Records'].first}.map(&@document_klass) else [] end end