MongoCollection.dropIndexes - multiple declarations
Function MongoCollection.dropIndexes
Drops all indexes in the collection.
void dropIndexes
(
DropIndexOptions options = DropIndexOptions(Nullable(DontCallDestructorT(), true))
) @safe;
Function MongoCollection.dropIndexes
Unofficial API extension, more efficient multi-index removal on MongoDB 4.2+
void dropIndexes
(
string[] names,
DropIndexOptions options = DropIndexOptions(Nullable(DontCallDestructorT(), true))
) @safe;
Example
import vibe .db .mongo .mongo;
void test()
{
auto coll = connectMongoDB("127.0.0.1") .getCollection("test");
coll .dropIndexes(["name_1_primarykey_-1"]);
}