Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.
A name that uniquely identifies the index.
Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.
Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.
If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.
Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.
Allows users to specify configuration to the storage engine on a per-index basis when creating an index.
For text indexes, a document that contains field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score. You can specify weights for some or all the indexed fields. The default value is 1.
For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.
For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.
For text indexes, the text index version number. Version can be either 1 or 2.
For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.
For 2d indexes, the number of precision of the stored geohash value of the location data.
For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.
For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.
For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.
The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.
For 2dsphere indexes, the 2dsphere index version number.
For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.
Builds the index in the background so that building an index does not block other database activities.
Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.
For 2d indexes, the number of precision of the stored geohash value of the location data.
For geoHaystack indexes, specify the number of units within which to group the location values; i.e.
For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.
For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer.
For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.
Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.
Specifies the index’s fields.
Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.
For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document.
For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.
For 2d indexes, the upper inclusive boundary for the longitude and latitude values.
For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.
For 2d indexes, the lower inclusive boundary for the longitude and latitude values.
For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.
A name that uniquely identifies the index.
The namespace (i.e.
The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.
If true, the index only references documents with the specified field.
If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.
Allows users to specify configuration to the storage engine on a per-index basis when creating an index.
For text indexes, the text index version number.
For text indexes, the text index version number. Version can be either 1 or 2.
Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index.
Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.
For text indexes, a document that contains field and weight pairs.
For text indexes, a document that contains field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score. You can specify weights for some or all the indexed fields. The default value is 1.
Specifies the index’s fields. For each field, specify a key-value pair in which the key is the name of the field to index and the value is either the index direction or index type. If specifying direction, specify 1 for ascending or -1 for descending.
A name that uniquely identifies the index.
Builds the index in the background so that building an index does not block other database activities. Specify true to build in the background. The default value is false.
Creates a unique index so that the collection will not accept insertion of documents where the index key or keys match an existing value in the index. Specify true to create a unique index. The default value is false.
If true, the index only references documents with the specified field. These indexes use less space but behave differently in some situations (particularly sorts). The default value is false.
Specifies a value, in seconds, as a TTL to control how long MongoDB retains documents in this collection.
Allows users to specify configuration to the storage engine on a per-index basis when creating an index.
For text indexes, a document that contains field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance of the field relative to the other indexed fields in terms of the score. You can specify weights for some or all the indexed fields. The default value is 1.
For text indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. The default value is english.
For text indexes, the name of the field, in the collection’s documents, that contains the override language for the document. The default value is language.
For text indexes, the text index version number. Version can be either 1 or 2.
For 2dsphere indexes, the 2dsphere index version number. Version can be either 1 or 2.
For 2d indexes, the number of precision of the stored geohash value of the location data.
For 2d indexes, the lower inclusive boundary for the longitude and latitude values. The default value is -180.0.
For 2d indexes, the upper inclusive boundary for the longitude and latitude values. The default value is 180.0.
For geoHaystack indexes, specify the number of units within which to group the location values; i.e. group in the same bucket those location values that are within the specified number of units to each other. The value must be greater than 0.
The namespace (i.e. <database>.<collection>) of the collection for which to create the index. If you omit ns, MongoDB generates the namespace.