[SERVER-13296] the optional namespace field for createIndexes command Created: 20/Mar/14  Updated: 10/Dec/14  Resolved: 20/Mar/14

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

if the createIndexes has the following syntax:

 
db.runCommand(
    { createIndexes: <collection name>,
      indexes: 
         [
            {
                key: <key spec>,
                name: <idx name> ,
                ns: <namespace>
            }
         ]
    }
)

such that you always specify the single collection and the db would be the database you run the command on, why have the optional ns field? since if it doesn't match the database and the collection name, it gives you

"errmsg" : "namespace mismatch"

Wouldn't the user always just omit it?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 20/Mar/14 ]

because that is the same as the old spec, so people might have it lying around with it, and we don't want to break things.

Generated at Thu Feb 08 03:31:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.