[SERVER-13356] Geospatial index intersection errors when used with a compound index Created: 26/Mar/14  Updated: 11/Jul/16  Resolved: 27/Mar/14

Status: Closed
Project: Core Server
Component/s: Geo, Index Maintenance, Querying
Affects Version/s: 2.6.0-rc2
Fix Version/s: 2.6.0-rc3

Type: Bug Priority: Major - P3
Reporter: Rajesh Khot Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: geo
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-13409 $near query trips verify when both 2d... Closed
Operating System: ALL
Steps To Reproduce:

db.foo.insert({fname:"MICKEY",lname:"MOUSE",state:"FL", loc:{type:"Point",coordinates:[-81.513743,28.369947]}})
 
db.foo.ensureIndex({"lname":1,"state":1},{name:"MYINDEX"})
db.foo.ensureIndex({loc:"2dsphere"})
 
// This will fail
db.foo.find({loc:{$near:{$geometry:{type:"Point",coordinates : [-81.513743,28.369947] }, $maxDistance :100}},lname:"MOUSE"})
 
 
db.foo.dropIndex("MYINDEX")
db.foo.ensureIndex({"lname":1},{name:"MYINDEX"})
 
// This will work since MYINDEX is not a compound index
db.foo.find({loc:{$near:{$geometry:{type:"Point",coordinates : [-81.513743,28.369947] }, $maxDistance :100}},lname:"MOUSE"})

Participants:

 Description   

Geospatial index query fail's when a non-geo field in the query is a part of a compound index. Perhaps a bug in the new 2.6 index intersection feature

error:

{ "$err" : "assertion src/mongo/db/exec/s2near.cpp:65" }

 Comments   
Comment by Githook User [ 27/Mar/14 ]

Author:

{u'username': u'hkhalsa', u'name': u'Hari Khalsa', u'email': u'hkhalsa@10gen.com'}

Message: SERVER-13356 correct an error in processing geonear index assignments
Branch: v2.6
https://github.com/mongodb/mongo/commit/9e94da386750daca4adb87e8a35f9477b734432f

Comment by Githook User [ 27/Mar/14 ]

Author:

{u'username': u'hkhalsa', u'name': u'Hari Khalsa', u'email': u'hkhalsa@10gen.com'}

Message: SERVER-13356 correct an error in processing geonear index assignments
Branch: master
https://github.com/mongodb/mongo/commit/5817556b86b10cb763bba126ae8c020fc1910792

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