[DOCS-1744] Use Cases - Storing Comments Created: 25/Jul/13 Updated: 24/Feb/16 Resolved: 18/Mar/15 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | ecosystem |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Campbell | Assignee: | Andrew Aldridge |
| Resolution: | Done | Votes: | 0 |
| Labels: | query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 8 years, 47 weeks, 5 days ago |
| Description |
|
The code example under the heading view paginated comments on http://docs.mongodb.org/manual/use-cases/storing-comments/ doesn't seem to work. The code seems to indicate that the find will be run on each iteration of the cursor and update the skip and limit variables. However, this doesn't appear to be the case. The original skip and limit values passed into the find are used on each document matched. |
| Comments |
| Comment by Githook User [ 20/Mar/15 ] |
|
Author: {u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}Message: |
| Comment by Matt Campbell [ 25/Jul/13 ] |
|
Here is a solution that works: def find_comments(discussion_id, skip, limit): , { 'page': 1 } ) for page in pages: , } You perform a find call for each page. If it can be done the way outlined at the above mention page it would be good to know what environment / setup it works under. |