1.1 backports ensure indexes

Backporting the MongoDB index management