-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
Minor Change
-
ALL
-
Can create indices, for example:
> coll.ensureIndex({'x.$a':1}) > coll.getIndexes() [ { "v" : 1, "name" : "_id_", "ns" : "test.t", "key" : { "_id" : 1 } }, { "v" : 1, "ns" : "test.t", "key" : { "x.$a" : 1 }, "name" : "x.$a_1" } ]
You can also create an index that contains an empty field name, i.e.: "x..a"
As you cannot save/insert/upsert a field with that name, it seems like incorrect behavior to be able to index on it.
- is related to
-
SERVER-11064 Stricter validation of index key patterns during index creation and startup
- Closed
-
SERVER-12070 Validate all indexes for new restrictions at startup
- Closed
-
SERVER-11812 Can create indexes on invalid fields (empty, $** component)
- Closed
- related to
-
SERVER-10075 Should forbid illegal form of TTL indexes
- Closed