You can create indexes in the background in MongoDB by using the “background” option. When you specify a value for the background option, MongoDB builds the index in the background so that building the index does not block other database activities.
Here is a general example:
```
db.collection.createIndex( { yourfield: 1 }, { background: true } )
```
In this example, “collection” should be replaced by the name of your collection and “yourfield” should be replaced by the name of the field you want to index.
Note: The function building the index in the background can negatively affect the performance of your running operations, so you might want to use this function in off-peak times.
Make sure you have admin access right to perform this operation.
In sharded clusters, creating an index in the background can take a long time but it will not block other operations.