-
Type: Improvement
-
Resolution: Done
-
Priority: Trivial - P5
-
Affects Version/s: None
-
Component/s: Index Maintenance
-
Fully Compatible
-
Query 10 (02/22/16)
If you run createIndexes with an index spec that includes a blank namespace, you get a 'namespace mismatch' error. The mismatch is technically true, but it'd be more user-friendly to detect blank namespaces and have a more specific error.
> var spec = {key: {'foo': 1}, name: 'blank', ns: ''}; > db.getSiblingDB('repro').foo.runCommand('createIndexes', {indexes: [spec]}); { "spec" : { "key" : { "foo" : 1 }, "name" : "blank", "ns" : "" }, "ok" : 0, "errmsg" : "namespace mismatch" }
Version: b605f98c68a03fd0e65be72f9a22af4f107dee6b