Document fields the index covers (e.g. ['email'], ['location']).
OptionalnameExplicit index name. Auto-generated by the server if omitted.
Optionaluniquepersistent/hash/skiplist: enforce uniqueness of the indexed field(s).
Optionalsparsepersistent/hash/skiplist/geo: exclude documents missing the indexed field(s).
Optionalgeogeo: interpret the indexed field as a GeoJSON object rather than [lat, lon].
Optionalminfulltext: minimum word length to index.
Optionalexpirettl: seconds after the indexed timestamp field at which documents expire.
OptionalinBuild the index without blocking other operations on the collection.
Options for
createIndex(). Which fields are meaningful depends ontype.