[SERVER-11149] Make 2dsphere indexes adhere to normal sparse index rules Created: 11/Oct/13  Updated: 10/Dec/14  Resolved: 21/Dec/13

Status: Closed
Project: Core Server
Component/s: Geo, Index Maintenance
Affects Version/s: 2.5.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Daniel Pasette (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DOCS-2146 Sparse Index Semantics for 2dsphere I... Closed
Related
related to SERVER-9639 2dsphere indexes with {2dsphereIndexV... Closed
is related to SERVER-13096 Add 2.4/2.6 multiversion tests for te... Closed
Operating System: ALL
Participants:

 Description   

The intent here is to make 2dsphere indexes behave the same as normal indexes with regard to sparseness. In SERVER-9639 the behavior was changed to mimic 2d indexes, which treat the index as sparse if a doc is missing geo fields.

Sparse-by-default means the query optimizer can't use compound geo indexes to satisfy non-geo queries.

Need to confirm that 2dsphere honors the sparse designation if it's chosen specifically and that it's possible to index a document with an undefined or null geo field.



 Comments   
Comment by Daniel Pasette (Inactive) [ 20/Dec/13 ]

The fix for this needs to be reverted before 2.6. The reason being is that you cannot upgrade a 2.4 server to 2.6 where the 2dsphere index was created with {sparse:true}. Namely, If a document without the geo field set is deleted with a 2.6 server which was indexed in 2.4, it will leave the index record in the index causing corruption.

Comment by auto [ 12/Nov/13 ]

Author:

{u'username': u'shelman', u'name': u'Sam Helman', u'email': u'sam.helman@10gen.com'}

Message: SERVER-11149 Improved version of geo_s2sparse.js

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/d0043ed509ff27707dc158259f00515a72fd343c

Comment by auto [ 24/Oct/13 ]

Author:

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

Message: SERVER-11149 2dsphere handle sparse like other indices
Branch: master
https://github.com/mongodb/mongo/commit/6332ae304a743abf86d47d92c12bf7f3f2169368

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