'autoIndexID' is not a valid collection option - mongoDB

后端 未结 3 365
借酒劲吻你
借酒劲吻你 2021-01-12 14:30

When I try to run this on my MongoDB:

db.createCollection(\"mycol\", { capped : true, autoIndexID : true, size : 6142800, max : 10000 } )

I

3条回答
  •  自闭症患者
    2021-01-12 15:28

    autoIndexId option has been removed in 3.4 and was already deprecated in 3.2

    From mongo doc and https://jira.mongodb.org/browse/SERVER-19067:

    Deprecated since version 3.2: The autoIndexId option will be removed in version 3.4.

    Also, for capped collection :

    Capped collections have an _id field and an index on the _id field by default.

提交回复
热议问题