db.collection.createIndex( { a: 1 }, { background: true } )https://docs.mongodb.org/manual/tutorial/build-indexes-in-the-background/