user3368388
user3368388

Reputation: 21

MongoDB background indexing

If I execute a text index in the background on MongoDB. Will this continue to execute even when I log out of the server?

db.test.ensureIndex({"name" : "text", "lastName" : "text"}, { background: true })

Upvotes: 1

Views: 389

Answers (2)

Vish
Vish

Reputation: 175

Index creation on the DB is one time operation. You can confirm this by logging out off the shell and logging back in and query the indexes: db.test.getIndexes()

Upvotes: 0

James Wahlin
James Wahlin

Reputation: 2821

The mongo shell does not have to remain open once an index creation operation has been launched. The build will continue even if the shell is closed.

Upvotes: 1

Related Questions