Ticket #307 (closed defect: invalid)
Index for GeoSpatial Queries (fixed report)
Reported by: | tom.mcnulty@… | Owned by: | jaymccarthy |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | jaymccarthy/mongodb.plt | Keywords: | |
Cc: | Version: | (1 7) | |
Racket Version: | 5.0.2.1 |
Description
My apologies, the last report was missing the first part.
When "2d" queries are made, queries will fail if the index does not have an object id. In all cases, it seems Indexes created with racket do not have an object id.
I noticed this by comparing an index created in the shell, to one created in racket. As expected, name: doesn't seem to be important.
(mongo-collection-index! event-col (hasheq 'location '2d))
=>
{
"name" : "#hasheq((location . 2d))",
"ns" : "space.events",
"key" : {
"location" : "2d"
}
}
db.events.ensureIndex({"location" : "2d"})
=>
{
"_id" : ObjectId??("4cd4995e9edd9c1e41d8f4ba"),
"ns" : "space.events",
"key" : {
"location" : "2d"
},
"name" : "location_"
}