Function MongoCollection.ensureIndex
Creates or updates an index.
Note that the overload taking an associative array of field orders is scheduled for deprecation. Since the order of fields matters, it is only suitable for single-field indices.
Prototypes
void ensureIndex(
scope const(std .typecons .Tuple!(string,int))[] field_orders,
IndexFlags flags = cast(IndexFlags)0,
core .time .Duration expire_time = dur(0L)
);
void ensureIndex(
int[string] field_orders,
IndexFlags flags = cast(IndexFlags)0,
ulong expireAfterSeconds = 0LU
);
Authors
Sönke Ludwig
Copyright
© 2012-2014 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.