Class CreateIndexRequest
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a create index request.
public class CreateIndexRequest
- Inheritance
-
CreateIndexRequest
- Inherited Members
Constructors
CreateIndexRequest(BsonDocument)
Initializes a new instance of the CreateIndexRequest class.
public CreateIndexRequest(BsonDocument keys)
Parameters
keys
BsonDocumentThe keys.
Properties
AdditionalOptions
Gets or sets the additional options.
public BsonDocument AdditionalOptions { get; set; }
Property Value
- BsonDocument
The additional options.
Background
Gets or sets a value indicating whether the index should be created in the background.
public bool? Background { get; set; }
Property Value
- bool?
A value indicating whether the index should be created in the background.
Bits
Gets or sets the bits of precision of the geohash values for 2d geo indexes.
public int? Bits { get; set; }
Property Value
- int?
The bits of precision of the geohash values for 2d geo indexes.
BucketSize
Gets or sets the size of the bucket for geo haystack indexes.
[Obsolete("GeoHaystack indexes were deprecated in server version 4.4.")]
public double? BucketSize { get; set; }
Property Value
- double?
The size of the bucket for geo haystack indexes.
Collation
Gets or sets the collation.
public Collation Collation { get; set; }
Property Value
DefaultLanguage
Gets or sets the default language for text indexes.
public string DefaultLanguage { get; set; }
Property Value
- string
The default language for text indexes.
ExpireAfter
Gets or sets when documents in a TTL collection expire.
public TimeSpan? ExpireAfter { get; set; }
Property Value
- TimeSpan?
When documents in a TTL collection expire.
Hidden
Gets or sets a value indicating whether the index is hidden.
public bool? Hidden { get; set; }
Property Value
- bool?
Keys
Gets the keys.
public BsonDocument Keys { get; }
Property Value
- BsonDocument
The keys.
LanguageOverride
Gets or sets the language override for text indexes.
public string LanguageOverride { get; set; }
Property Value
- string
The language override for text indexes.
Max
Gets or sets the maximum coordinate value for 2d indexes.
public double? Max { get; set; }
Property Value
- double?
The maximum coordinate value for 2d indexesThe maximum.
Min
Gets or sets the minimum coordinate value for 2d indexes.
public double? Min { get; set; }
Property Value
- double?
The minimum coordinate value for 2d indexes.
Name
Gets or sets the index name.
public string Name { get; set; }
Property Value
- string
The index name.
PartialFilterExpression
Gets or sets the partial filter expression.
public BsonDocument PartialFilterExpression { get; set; }
Property Value
- BsonDocument
The partial filter expression.
Sparse
Gets or sets a value indicating whether the index is a sparse index.
public bool? Sparse { get; set; }
Property Value
- bool?
A value indicating whether the index is a sparse index.
SphereIndexVersion
Gets or sets the 2dsphere index version.
public int? SphereIndexVersion { get; set; }
Property Value
- int?
The 2dsphere index version.
StorageEngine
Gets or sets the storage engine options.
public BsonDocument StorageEngine { get; set; }
Property Value
- BsonDocument
The storage engine options.
TextIndexVersion
Gets or sets the text index version.
public int? TextIndexVersion { get; set; }
Property Value
- int?
The text index version.
Unique
Gets or sets a value indicating whether the index enforces the uniqueness of the key values.
public bool? Unique { get; set; }
Property Value
- bool?
A value indicating whether the index enforces the uniqueness of the key values.
Version
Gets or sets the index version.
public int? Version { get; set; }
Property Value
- int?
The index version.
Weights
Gets or sets the weights for text indexes.
public BsonDocument Weights { get; set; }
Property Value
- BsonDocument
The weights for text indexes.
WildcardProjection
Gets or sets the wildcard projection.
public BsonDocument WildcardProjection { get; set; }
Property Value
- BsonDocument
The wildcardProjection for indexes.
Methods
GetIndexName()
Gets the name of the index.
public string GetIndexName()
Returns
- string
The name of the index.