Method: Esse::Index::ObjectDocumentMapper#documents
- Defined in:
- lib/esse/index/object_document_mapper.rb
#documents(repo_name = nil, **kwargs) ⇒ Enumerator
Wrap collection data into serialized documents
Example:
GeosIndex.documents(id: 1).first
25 26 27 28 29 30 31 |
# File 'lib/esse/index/object_document_mapper.rb', line 25 def documents(repo_name = nil, **kwargs) Enumerator.new do |yielder| each_serialized_batch(repo_name, **kwargs) do |documents, **_collection_kargs| documents.each { |document| yielder.yield(document) } end end end |