27 IndexNotFound: Index not found
MongoDBQue signifie cette erreur ?
L'index référencé est introuvable sur la collection. Apparaît généralement lors d'une tentative de suppression ou de renommage d'un index inexistant.
Cause
Nom d'index ou spécification de clé erroné dans une commande comme dropIndex/hideIndex ; index déjà supprimé auparavant ; ou nom d'index généré automatiquement différent de celui attendu (MongoDB génère des noms comme field_1_field2_-1).
Comment la corriger
Listez les index existants et leurs noms exacts : db.my_collection.getIndexes(). Répétez l'opération avec le bon nom ou le bon document de clé : db.my_collection.dropIndex({field: 1}) ou db.my_collection.dropIndex('field_1'). Écrivez les scripts de suppression de sorte qu'ils n'échouent pas si l'index est absent (avec un contrôle d'existence).
Autres entrées pour ce moteur
- 11601 InterruptedOperation was interrupted
- 85 IndexOptionsConflictIndex already exists with different options / different name (un index existe déjà avec d'autres options / un autre nom)
- 67 CannotCreateIndexCannot create index
- 79 UnknownReplWriteConcernUnknown replica set write concern
- 10107 NotWritablePrimarynot master / not writable primary
- 91 ShutdownInProgressThe server is in the process of shutting down (le serveur est en cours d'arrêt)
- 189 PrimarySteppedDownPrimary stepped down while operation was in progress (le primaire a été rétrogradé pendant l'opération)