[SERVER-767] Limits do not seem to work for Geospatial queries with additional terms Created: 16/Mar/10 Updated: 12/Jul/16 Resolved: 17/Mar/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.3.3 |
| Fix Version/s: | 1.3.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg White | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux/Ubuntu/64-bit |
||
| Participants: |
| Description |
|
Limits do not seem to work for Geospatial queries. A count() on the returned result set always returns 100. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 26/Apr/10 ] |
|
in a release |
| Comment by Eliot Horowitz (Inactive) [ 17/Mar/10 ] |
|
same root problem as |
| Comment by Greg White [ 17/Mar/10 ] |
|
Retested with this version: Wed Mar 17 12:37:37 git version: 46fc051a74ec85910516309d436d5708c26c2576 And the behavior is the same. |
| Comment by Eliot Horowitz (Inactive) [ 16/Mar/10 ] |
|
pretty sure this was already fixed for 1.3.4 |
| Comment by Greg White [ 16/Mar/10 ] |
|
A geospatial query with an additional term does not limit properly. For example: res = biz.find({ "l" : { "$near" : [b.lat, b.lon]}, "s" : { "$in": [58120628, 58120619, 58124600, 58120600]}}).limit(200) Will return often return fewer than 200 results, even if far, far, far more than 200 exist. What seems to happen is that the limit is applied to the first term, before the subsequent terms are processed, so, for example, the Geo query may be returning 200, but only 8 of those match the $in clause, resulting in 8 results. What I'd expect to see is 200 results (since, in my example, I have far more than 200 results), ordered by distance. |