Class IndexOptionsBuilder
A builder for the options used when creating an index.
[Serializable]
[BsonSerializer(typeof(IndexOptionsBuilder.Serializer))]
public class IndexOptionsBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoIndexOptions
- Inheritance
-
IndexOptionsBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
- IndexOptionsBuilder()
Initializes a new instance of the IndexOptionsBuilder class.
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(string)
Specifies 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(string, int)
Sets the weight of a field for the text index.
- SetWildcardProjection(string, bool)
Sets the wildcardProjection for the index.
- ToBsonDocument()
Returns the result of the builder as a BsonDocument.