public Create ( string spec, bool safe = false, bool unique = false, bool sparse = false, bool background = false, bool dropDups = false, double min = null, double max = null ) : Task> |
spec |
string |
JSON string with the index's specification. {lastName:1, firstName:1} |
safe |
bool |
|
unique |
bool |
|
sparse |
bool |
|
background |
bool |
creates the index in the background, yielding whenever possible |
dropDups |
bool |
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 |
min |
double |
for geospatial indexes set the lower bound for the co-ordinates |
max |
double |
for geospatial indexes set the high bound for the co-ordinates. |
return |
Task> |
|