When MongoDB is disabled abnormally, the index file may be damaged, and the data is not reflected in the index when the data is updated.
When MongoDB is disabled abnormally, the index file may be damaged, and the data is not reflected in the index when the data is updated.
Problem description:
When MongoDB is disabled abnormally, the index file may be damaged, and the data is not reflected in the index when the data is updated.
Solution:
Use scripts to recreate the indexes of all MongoDB tables.
Var names = db. getCollectionNames ();
For (var I in names ){
Var name = names [I];
Print (name );
Var coll = db. getCollection (name );
Coll. reIndex ();
}
CentOS compilation and installation of MongoDB
CentOS compilation and installation of php extensions for MongoDB and mongoDB
CentOS 6 install MongoDB and server configuration using yum
Install MongoDB2.4.3 in Ubuntu 13.04
MongoDB beginners must read (both concepts and practices)
MongoDB authoritative Guide (The Definitive Guide) in English [PDF]
MongoDB details: click here
MongoDB: click here