[SERVER-19870] mongo shell returning wrong value Created: 11/Aug/15  Updated: 11/Aug/15  Resolved: 11/Aug/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: sumit Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Hello team,

mongo shell returning wrong number of doc while using non positive number in limit() function.

> db.products.find({},{"name":1}).sort({name:-1}).limit(0).size()
11

please suggest.



 Comments   
Comment by Ramon Fernandez Marina [ 11/Aug/15 ]

This is expected, please see the documentation on limit with a zero value.

Generated at Thu Feb 08 03:52:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.