Click or drag to resize

PostIndexBody Properties

The PostIndexBody type exposes the following members.

Properties
  NameDescription
Public propertyDeduplicate
Supported by array indexes of type Persistent. The default value is true. It controls whether inserting duplicate index values from the same document into a unique array index will lead to a unique constraint error or not.
Public propertyEstimates
Supported by indexes of type Persistent. Defaults to true if not set. This property controls whether index selectivity estimates are maintained for the index.
Public propertyExpireAfter
Supported by indexes of type TTL. The time interval (in seconds) from the point in time stored in the Fields property after which the documents count as expired. Can be set to 0 to let documents expire as soon as the server time passes the point in time stored in the document attribute, or to a higher number to delay the expiration.
Public propertyFields
The attributes to be indexed. Depending on the index type, a single attribute or multiple attributes can be indexed.
Public propertyGeoJson
Supported by indexes of type Geo. If a geo-spatial index on a location is constructed and geoJson is true, then the order within the array is longitude followed by latitude.
Public propertyInBackground
Can be set to true to create the index in the background, which will not write-lock the underlying collection for as long as if the index is built in the foreground.
Public propertyMinLength
Supported by indexes of type FullText. Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.
Public propertyName
The name of the new index. If you do not specify a name, one will be auto-generated.
Public propertySparse
Applies to indexes of type Persistent. Can be set to true to create a sparse index. Sparse indexes do not index documents for which any of the index attributes is either not set or is null.
Public propertyType
The type of index to create. Supported index types can be found in IndexTypes.
Public propertyUnique
Set this property to true to create a unique index. Setting it to false or omitting it will create a non-unique index.
Top
See Also