globalsign / mgo

The MongoDB driver for Go
Other
1.97k stars 230 forks source link

Add support to Ensure multiple indexes in one call #310

Open fuzzypete opened 5 years ago

fuzzypete commented 5 years ago

I want to eventually have the ability to manage my replica set with different targeted functions. One of these would be an offline full rebuild of all indexes in the foreground to yield best results. However, there is no support to actually submit multiple indexes to Mongo in a batch which minimizes the number of collection scans.

This is a small enhancement which I have prepared for a Pull