[SERVER-791] geospatial box query doesn't find center point Created: 19/Mar/10  Updated: 12/Jul/16  Resolved: 19/Mar/10

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: 1.3.5

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

db version v1.3.5-, pdfile version 4.5
git version: b14d45ae5575fbdc7042c4798a63bd77d50ec92e


Participants:

 Description   

I'm creating a 9x9 grid from [1,1]-[9,9], then I'm querying for the box [[4,4],[6,6]] and it's not finding the (5,5) point.

> db.geo.drop()
true
> db.geo.ensureIndex(

{"loc" : "2d"}

,

{"min" : 0, "max" : 10}

)
> for (i=1; i<10; i+) { for(j=1; j<10; j+) { db.geo.insert(

{loc : [i,j]}

); } }
> db.geo.find({loc : {$within : {$box : [[4,4],[6,6]]}}})
> db.geo.find(

{loc : [5,5]}

)

{ "_id" : ObjectId("4ba3912921c2dc6b59b9684f"), "loc" : [ 5, 5 ] }

>



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Apr/10 ]

in a release

Comment by auto [ 19/Mar/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix $box corner cases SERVER-791
http://github.com/mongodb/mongo/commit/a1da8961abc17cef7564d42ca1b95c0ba8b45fa5

Generated at Thu Feb 08 02:55:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.