Type alias EnsureTtlIndexOptions

EnsureTtlIndexOptions: { expireAfter: number; fields: [string]; inBackground?: boolean; name?: string; type: "ttl" }

Options for creating a TTL index.

Type declaration

  • expireAfter: number

    Duration in seconds after the attribute value at which the document will be considered as expired.

  • fields: [string]

    An array containing exactly one attribute path.

  • Optional inBackground?: boolean

    If 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?: string

    A unique name for this index.

  • type: "ttl"

    Type of this index.

Generated using TypeDoc