Type alias EnsureIndexOptionsType<Type, Fields, Extra>

EnsureIndexOptionsType<Type, Fields, Extra>: {
    fields: Fields;
    inBackground?: boolean;
    name?: string;
    type: Type;
} & Extra

Shared attributes of all index creation options.

Type Parameters

  • Type extends IndexType
  • Fields extends any[]
  • Extra extends {} = {}

Type declaration

  • fields: Fields

    An array of attribute paths.

  • 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: Type

    Type of this index.