Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MongodbIndexOptions

Creates an index on the db and collection collection.

see

http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createIndex

Hierarchy

  • MongodbIndexOptions

Index

Properties

Optional background

background: boolean

Creates the index in the background, yielding whenever possible.

Optional dropDups

dropDups: boolean

A unique index cannot be created on a key that has pre-existing duplicate values. If you would like to create the index anyway, keeping the first document the database indexes and deleting all subsequent documents that have duplicate value.

Optional expireAfterSeconds

expireAfterSeconds: number

Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher).

Optional j

j: boolean

Specify a journal write concern.

Optional max

max: number

For geospatial indexes set the high bound for the co-ordinates.

Optional min

min: number

For geospatial indexes set the lower bound for the co-ordinates.

Optional name

name: string

Override the autogenerated index name (useful if the resulting name is larger than 128 bytes).

Optional sparse

sparse: boolean

Creates a sparse index.

Optional unique

unique: boolean

Creates an unique index.

Optional v

v: number

Specify the format version of the indexes.

Optional w

w: number | string

The write concern.

Optional wtimeout

wtimeout: number

The write concern timeout.

Generated using TypeDoc