Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
'autoIndexID' is not a valid collection option - mongoDB

When I try to run this on my MongoDB:

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

I get this:

{
    "ok" : 0,
    "errmsg" : "The field 'autoIndexID' is not a valid collection option. Options: { capped: true, autoIndexID: true, size: 6142800.0, max: 10000.0 }",
    "code" : 72,
    "codeName" : "InvalidOptions"
}

I just don't get it... Sorry if it's dumb. :/

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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.

over 4 years ago · Santiago Trujillo Report

0

The correct option is autoIndexId , you had put autoIndexID .

over 4 years ago · Santiago Trujillo Report

0

You can also use the option --convertLegacyIndexes (you'll need to use a fairly new version of mongorestore though).

That has been working for me for dumps made from mongodb v2.6

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!