-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 2.6.0-rc2
-
Component/s: Index Maintenance
-
None
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
It is possible to make a compound index in which the first field is "2d" and the second is "text":
> db.coll.ensureIndex({a: "2d", b: "text"})
{
"createdCollectionAutomatically" : true,
"numIndexesBefore" : 1,
"numIndexesAfter" : 2,
"ok" : 1
}
Other special index types disallow this, for example "2dsphere":
> db.coll.ensureIndex({a: "2dsphere", b: "text"})
{
"createdCollectionAutomatically" : true,
"numIndexesBefore" : 1,
"errmsg" : "exception: Cannot use 2dsphere index with other special index types: b: \"text\"",
"code" : 16823,
"ok" : 0
}
We may want to do the same validation for "2d" that we do for "2dsphere".
- related to
-
SERVER-12538 Possible to create indexes with invalid orderings
-
- Closed
-