Optional
cacheIf set to true
, an in-memory hash cache will be put in front of the
persistent index.
Default: false
Optional
deduplicate?: booleanIf set to false
, inserting duplicate index values from the same
document will lead to a unique constraint error if this is a unique index.
Default: true
Optional
estimates?: booleanIf set to false
, index selectivity estimates will be disabled for this
index.
Default: true
An array of attribute paths.
Optional
inIf set to true
, the index will be created in the background to reduce
the write-lock duration for the collection during index creation.
Default: false
Optional
name?: stringA unique name for this index.
Optional
sparse?: booleanIf set to true
, the index will omit documents that do not contain at
least one of the attribute paths in fields
and these documents will be
ignored for uniqueness checks.
Default: false
Optional
storedAn array of attribute paths that will be stored in the index but can not be used for index lookups or sorting but can avoid full document lookups.
Type of this index.
Optional
unique?: booleanIf set to true
, a unique index will be created.
Default: false
Generated using TypeDoc
Options for creating a persistent index.