Manage In-Progress Index Creation¶
View Index Creation Operations¶
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
Active Indexing Operations for an example.
msg field will include the percent of the build
that is complete.
Terminate Index Creation¶
To terminate an ongoing index build, use the
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.
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.
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.