SERVER-41263ClosedFixed
Disallow the empty string as an index key type
At present it is possible to generate an index with an empty string as the key type (eg a definition of \{x:""}). The optimizer seems to be able to use this index when the key is a predicate in the query: However it is unable to use the index to sort: {noformat} > db.repro.find({x:123}).sort({x:1}).explain() { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "repro.repro", "indexFilterSet" : false, "parsedQuery" : { "x" : { "$eq" : 123 } }, "que