MongoDB {autoIndexID,true} reports an error, why?
大家讲道理
大家讲道理 2017-05-02 09:25:38
0
1
797

Newbie, I just started learning MongoDB. When I created a collection, I used the command:
db.createCollection("mycol",{ autoIndexID: true })
Creation failed, prompt:

{
"ok" : 0,
"errmsg" : "The field 'autoIndexID' is not a valid collection option. Options: { autoIndexID: true }",
"code" : 72 ,
"codeName" : "InvalidOptions"
}
Even if it is changed to false, it will fail. But if you don't add this, you can succeed.

I want to know the reason, thank you God!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
黄舟

Read as many official documents as possible during the learning process. The content of many blogs is not rigorous:

autoIndexID --> autoIndexId

For reference.

Love MongoDB! Have Fun!


<--Please click on the left, it’s April! Registration for the MongoDB Chinese Community Shenzhen User Conference has begun! Gathering of great gods!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template