Table of Contents

Class IndexInfo

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

Represents information about an index.

public class IndexInfo
Inheritance
IndexInfo
Inherited Members
Extension Methods

Constructors

IndexInfo(BsonDocument)

Creates a new instance of the IndexInfo class.

public IndexInfo(BsonDocument document)

Parameters

document BsonDocument

The BSON document that contains information about the index.

Properties

DroppedDups

Gets a value indicating whether dups were dropped when the index was created.

public bool DroppedDups { get; }

Property Value

bool

IsBackground

Gets a value indicating whether the index was created in the background.

public bool IsBackground { get; }

Property Value

bool

IsHidden

Gets a value indicating whether the index is hidden.

public bool IsHidden { get; }

Property Value

bool

IsSparse

Gets a value indicating whether the index is sparse.

public bool IsSparse { get; }

Property Value

bool

IsUnique

Gets a value indicating whether the index is unique.

public bool IsUnique { get; }

Property Value

bool

Key

Gets the key of the index.

public IndexKeysDocument Key { get; }

Property Value

IndexKeysDocument

Name

Gets the name of the index.

public string Name { get; }

Property Value

string

Namespace

Gets the namespace of the collection that the index is for.

public string Namespace { get; }

Property Value

string

RawDocument

Gets the raw BSON document containing the index information.

public BsonDocument RawDocument { get; }

Property Value

BsonDocument

TimeToLive

Gets the time to live value (or TimeSpan.MaxValue if index doesn't have a time to live value).

public TimeSpan TimeToLive { get; }

Property Value

TimeSpan

Version

Gets the version of the index.

public int Version { get; }

Property Value

int