Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
'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 Respuestas
Responde la pregunta

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 Denunciar

0

The correct option is autoIndexId , you had put autoIndexID .

over 4 years ago · Santiago Trujillo Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda