[SERVER-23000] mongodb 3.2:2d index return all document by default in "Proximity to a Point on a Flat Surface" ,not 100 as descripted in manual Created: 08/Mar/16 Updated: 14/Mar/16 Resolved: 11/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 3.0.3, 3.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | jiawenjie | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | 1. create mongodb 3.2 and 2.6 instance respectively |
||||||||
| Participants: | |||||||||
| Description |
|
I use 2-d index to match in player collection as follows db.player.find({'match_lv':{'$near':[1,0]}}).count(); However, in mongodb 3.2, it return all documents not 100 document by default. I guess there is something wrong in mongdb 3.0 and mongodb 3.2 in 2-d index, because it conflict with manual |
| Comments |
| Comment by Kelsey Schubert [ 14/Mar/16 ] |
|
Hi jiawenjie, Thank you for pointing me to the documentation you were referencing. I have opened Best regards, |
| Comment by jiawenjie [ 12/Mar/16 ] |
|
Hi,Thomas Schubert Jia ------------------ 原始邮件 ------------------ 主题: [MongoDB-JIRA] ( Thomas Schubert closed Hi jiawenjie, Thanks for reporting this behavior. I believe you are referencing the 2.6 documentation which states that the $near queries that use a 2d index will return a limit of 100 documents. In MongoDB 3.0, this limit is no longer used and our latest documentation does not mention this restriction. Please use limit() If you would like to limit the number of results. Kind regards, ---------------------- |
| Comment by jiawenjie [ 12/Mar/16 ] |
|
Hi,Thomas Schubert |
| Comment by Kelsey Schubert [ 11/Mar/16 ] |
|
Hi jiawenjie, Thanks for reporting this behavior. I believe you are referencing the 2.6 documentation which states that the $near queries that use a 2d index will return a limit of 100 documents. In MongoDB 3.0, this limit is no longer used and our latest documentation does not mention this restriction. Please use limit() If you would like to limit the number of results. Kind regards, |