[DOCS-8630] Comment on: "primer/query.txt" for Node Created: 19/Aug/16  Updated: 03/Jun/19  Resolved: 03/Jun/19

Status: Closed
Project: Documentation
Component/s: primer
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Node

Location: https://docs.mongodb.com/getting-started/node/query/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Referrer: https://docs.mongodb.com/getting-started/node/insert/
Screen Resolution: 1440 x 900


Participants:
Days since reply: 4 years, 36 weeks, 2 days ago

 Description   

The examples are great, but all use cursor.each() to iterate over the results. With a huge table this might flood your application with loads of data, because you can't stop and resume the "stream" of docs.

I would love to see an example on how to fetch docs by smaller quantities, to enable processing, e.g. to fetch docs in 100 pieces to batch insert them into Elastic. But still iterate over all results, not just limit the result to 100 docs.



 Comments   
Comment by Kay Kim (Inactive) [ 03/Jun/19 ]

The primer site has been replaced. The node driver primer doc now points to the node.js docs, maintained by the node driver engineers.

Generated at Thu Feb 08 07:56:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.