Class IndexOptions<TDocument>
A builder for the options used when creating an index.
public static class IndexOptions<TDocument>
Type Parameters
TDocument
The type of the document.
- Inheritance
-
IndexOptions<TDocument>
- Inherited Members
Properties
- Null
Gets a null value with a type of IMongoIndexOptions.
Methods
- SetBackground(bool)
Sets whether to build the index in the background.
- SetBits(int)
Sets the location precision bits.
- SetBucketSize(double)
Sets the bucket size for geospatial haystack indexes.
- SetDropDups(bool)
Sets whether duplicates should be dropped.
- SetGeoSpatialRange(double, double)
Sets the geospatial range.
- SetHidden(bool)
Sets whether the index is hidden.
- SetName(string)
Sets the name of the index.
- SetPartialFilterExpression(IMongoQuery)
Sets the partial filter expression.
- SetSparse(bool)
Sets whether the index is a sparse index.
- SetStorageEngineOptions(BsonDocument)
Sets the storage engine options.
- SetTextDefaultLanguage(string)
Sets the default language for the text index.
- SetTextLanguageOverride(Expression<Func<TDocument, string>>)
Specifies a member expression for the field name containing the language for the text index.
- SetTimeToLive(TimeSpan)
Sets the time to live value.
- SetUnique(bool)
Sets whether the index enforces unique values.
- SetWeight<TMember>(Expression<Func<TDocument, TMember>>, int)
Sets the weight of a field for the text index.
- SetWildcardProjection<TMember>(Expression<Func<TDocument, TMember>>, bool)
Sets the wildcardProjection for the index.