MongoDB Documentation, Release 3.0.4 ], "ok" : 1 } This shell helper provides a wrapper around the reIndex database command . Your client library may have a different or additional interface for this operation. Note: To build or rebuild indexes for a replica set see Build Indexes on Replica Sets (page 521). To see the status of an indexing process, you can use the db.currentOp() method in the mongo shell. To filter the current operations for index creation operations, see currentOp-index-creation for an example. The msg field will include the percent of the build that is complete. You cannot terminate a replicated index build on secondary members of a replica set. To minimize the impact of building an index on replica sets, see Build Indexes on Replica Sets (page 521). To terminate an ongoing index build, use the db.killOp() method in the mongo shell. For index builds, the effects of db.killOp() may not be immediate and may occur well after much of the index build operation has completed. Changed in version 2.4: Before MongoDB 2.4, you could only terminate background index builds. After 2.4, you can terminate both background index builds and foreground index builds. When performing maintenance you may want to check which indexes exist on a collection. In the mongo shell, you can use the getIndexes() method to return a list of the indexes on a collection. Index Concepts (page 486) and Indexing Tutorials (page 517) for more information about indexes in MongoDB and common index management operations. To return a list of all indexes on a collection, use the db.collection.getIndexes() method or a similar method for your driver$^{9}$. For example, to view all indexes on the people collection: $^{9}$https://api.mongodb.org/ 527 8.3. Indexing Tutorials List all Indexes on a Collection See also: Return a List of All Indexes See also: Terminate Index Creation View Index Creation Operations Manage In-Progress Index Creation Additional Considerations db.currentOp() , db.killOp()