MongoCollection.listIndexes

Returns an array that holds a list of documents that identify and describe the existing indexes on the collection.

struct MongoCollection
@safe
MongoCursor!R
listIndexes
(
R = Bson
)
()

Examples

import vibe.db.mongo.mongo;

void test()
{
	auto coll = connectMongoDB("127.0.0.1").getCollection("test");

	foreach (index; coll.listIndexes())
		logInfo("index %s: %s", index["name"].get!string, index);
}

Meta