Table of Contents

Class IndexKeys

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

A builder for specifying the keys for an index.

public static class IndexKeys
Inheritance
IndexKeys
Inherited Members

Methods

Ascending(params string[])

Sets one or more key names to index in ascending order.

Descending(params string[])

Sets one or more key names to index in descending order.

GeoSpatial(string)

Sets the key name to create a geospatial index on.

GeoSpatialHaystack(string)

Sets the key name to create a geospatial haystack index on.

GeoSpatialHaystack(string, string)

Sets the key name and additional field name to create a geospatial haystack index on.

GeoSpatialSpherical(string)

Sets the key name to create a spherical geospatial index on.

Hashed(string)

Sets the key name to create a hashed index on.

Text(params string[])

Sets one or more key names to include in the text index.

TextAll()

Create a text index that indexes all text fields of a document.

Wildcard(string)

Sets a wildcard key to the index. The method doesn't expect to specify a wildcard key explicitly.