Hi
As per mongo doc on geo, [
http://www.mongodb.org/display/DOCS/Geospatial+Indexing] ->Multi-location
documents >
db.places.insert({ addresses : [ { name : "Home", loc : [55.5, 42.3] }, {
name : "Work", loc : [32.3, 44.2] } ] })
how to find, all records near to address.loc [ 55.5,42.3] and those are
tagged as "home" (in same array element)
> db.places.find({"address" : {$elemMatch:{"loc":{$near:[55.5,42.3]},name:"Home"}}})
error: {
"$err" : "can't find special index: 2d for: { address: { $elemMatch:
{ loc: { $near: [55.5,42.3] }, name: \"Home\" } } }",
"code" : 13038
}
created jira issue here :
https://jira.mongodb.org/browse/SERVER-7581
I think Geo is very very restrictive in Mongo, and great if someone
can quickly plan fix for it!
Raxit