Table of Contents

Method DropIndex

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

DropIndex(IMongoIndexKeys)

Drops an index on this collection.

public virtual CommandResult DropIndex(IMongoIndexKeys keys)

Parameters

keys IMongoIndexKeys

The indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder).

Returns

CommandResult

A CommandResult.

DropIndex(params string[])

Drops an index on this collection.

public virtual CommandResult DropIndex(params string[] keyNames)

Parameters

keyNames string[]

The names of the indexed fields.

Returns

CommandResult

A CommandResult.