Interface IndexDescription

Hierarchy

  • Pick<CreateIndexesOptions, "background" | "unique" | "partialFilterExpression" | "sparse" | "hidden" | "expireAfterSeconds" | "storageEngine" | "version" | "weights" | "default_language" | "language_override" | "textIndexVersion" | "2dsphereIndexVersion" | "bits" | "min" | "max" | "bucketSize" | "wildcardProjection">
    • IndexDescription

Properties

2dsphereIndexVersion?: number
background?: boolean

Creates the index in the background, yielding whenever possible.在后台创建索引,尽可能生成索引。

bits?: number
bucketSize?: number
collation?: CollationOptions
default_language?: string
expireAfterSeconds?: number

Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher)允许您使应用于数据的索引上的数据过期(MongoDB 2.2或更高版本)

hidden?: boolean

Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. 指定索引应存在于目标集合上,但查询计划器在执行操作时不应使用该索引。(MongoDB 4.4 or higher)

key: {
    [key: string]: IndexDirection;
} | Map<string, IndexDirection>

Type declaration

language_override?: string
max?: number

For geospatial indexes set the high bound for the co-ordinates.对于地理空间索引,设置坐标的上限。

min?: number

For geospatial indexes set the lower bound for the co-ordinates.对于地理空间索引,设置坐标的下限。

name?: string
partialFilterExpression?: Document

Creates a partial index based on the given filter object (MongoDB 3.2 or higher)基于给定的筛选器对象创建部分索引(MongoDB 3.2或更高版本)

sparse?: boolean

Creates a sparse index.创建稀疏索引。

storageEngine?: Document

Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher)允许用户在创建索引时按每个索引配置存储引擎。(MongoDB 3.0或更高版本)

textIndexVersion?: number
unique?: boolean

Creates an unique index.创建唯一索引。

version?: number

Specifies the index version number, either 0 or 1.指定索引版本号,0或1。

weights?: Document
wildcardProjection?: Document

Generated using TypeDoc