-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
None
It looks like there's a uassert in indexkey.cpp, but it isn't correct. I think it should be:
uassert( 13529 , "sparse only works for single field keys" , ! _sparse || _nFields == 1 );
Example:
admin> db.foo.ensureIndex(
{x:1,y:1},
{sparse:true,unique:true})
admin> db.foo.getIndexes()
[
{
"v" : 1,
"key" :
,
"ns" : "admin.foo",
"name" : "id"
},
{
"v" : 1,
"key" :
,
"unique" : true,
"ns" : "admin.foo",
"name" : "x_1_y_1",
"sparse" : true
}
]
- related to
-
SERVER-10403 sparse compound index should really be sparse
- Closed