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: undefined | true | false

Creates the index in the background, yielding whenever possible.

Optional dropDups

dropDups: undefined | true | false

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: undefined | number

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

Optional j

j: undefined | true | false

Specify a journal write concern.

Optional max

max: undefined | number

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

Optional min

min: undefined | number

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

Optional name

name: undefined | string

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

Optional sparse

sparse: undefined | true | false

Creates a sparse index.

Optional unique

unique: undefined | true | false

Creates an unique index.

Optional v

v: undefined | number

Specify the format version of the indexes.

Optional w

w: number | string

The write concern.

Optional wtimeout

wtimeout: undefined | number

The write concern timeout.

Generated using TypeDoc