MongoCollection.dropIndexes

Unofficial API extension, more efficient multi-index removal on MongoDB 4.2+

  1. void dropIndexes(DropIndexOptions options)
  2. void dropIndexes(string[] names, DropIndexOptions options)
    struct MongoCollection
    @safe
    void
    dropIndexes
    (
    string[] names
    ,
    DropIndexOptions options = DropIndexOptions.init
    )

Examples

import vibe.db.mongo.mongo;

void test()
{
	auto coll = connectMongoDB("127.0.0.1").getCollection("test");
	coll.dropIndexes(["name_1_primarykey_-1"]);
}

Meta