[SERVER-3170] $near queries don't work with multi-key Created: 31/May/11  Updated: 29/May/12  Resolved: 31/May/11

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 1.8.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kyle Banker Assignee: Greg Studer
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

db.foo.save({a: [

{l: [1, 1]}

,

{l: [2, 2]}

])
db.foo.ensureIndex(

{ 'a.l': '2d' }

)
db.l.find({'a.l': {$near: [0, 0]}}).explain()

{
"cursor" : "GeoSearchCursor",
"nscanned" : 1,
"nscannedObjects" : 1,
"n" : 1,
"millis" : 0,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : false,
"indexBounds" : {

}
}



 Comments   
Comment by Greg Studer [ 31/May/11 ]

Multi-location documents are only in v1.9+

http://www.mongodb.org/display/DOCS/Geospatial+Indexing#GeospatialIndexing-MultilocationDocuments

Comment by Martin Wawrusch [ 31/May/11 ]

1.8.0


Martin Wawrusch
p: +1 310 773 7346

I blog at http://martinatsunset.com : O API Marketplace, Where Art Thou
Follow me on twitter at http://twitter.com/martin_sunset
Learn more about me <http://about.me/martinw>

freshfugu <http://freshfugu.com> public beta launch coming this month. Stay
tuned.
triponadeal.com new episode is out: 10 ways to save in Europe

Comment by Eliot Horowitz (Inactive) [ 31/May/11 ]

What version was this with?
Should be working in 1.9.x

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