[DOCS-6903] Comment on: "primer/aggregation.txt" Created: 05/Jan/16 Updated: 03/Nov/17 Resolved: 29/Mar/16 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Kay Kim (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
python, mongo, mac osx, linux Location: https://docs.mongodb.org/getting-started/python/aggregation/ |
||
| Participants: | |
| Days since reply: | 7 years, 46 weeks, 2 days ago |
| Description |
|
Hello, (https://docs.mongodb.org/getting-started/python/aggregation/) Your documentation is not complete. The "db.collection.aggregate.(....)" will not return a cursor on the different value but a dict with "ok" (with value 0 or 1) and "result" (with the different values). The actual documentation should be: ---------------------------------------------------------------------------------------- cursor = db.restaurants.aggregate( }} if cursor['ok'] == 1: ---------------------------------------------------------------------------------------- Hope it will be useful. Thanks you. |
| Comments |
| Comment by Kay Kim (Inactive) [ 29/Mar/16 ] | |||||||||||||||||
|
Hi – thank you for filing the ticket. I believe the documentation is correct as since PyMongo v3.0 aggregate method returns a CommandCursor (see API)
To verify the version of PyMongo:
|