File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ db.collection.ensureIndex()
52
52
==================== ================= =========
53
53
background true or false false
54
54
unique true or false false
55
+ name string none
56
+ cache true or false true
55
57
dropDups true or false false
56
58
sparse true or false false
57
59
expireAfterSeconds integer none
@@ -69,6 +71,14 @@ db.collection.ensureIndex()
69
71
or keys matches an existing value in the
70
72
index.
71
73
74
+ :option string name: Specify the name of the index. If unspecified,
75
+ the index name will be generated by concatenating
76
+ the names of the indexed fields and the sort order.
77
+
78
+ :option Boolean cache: Specify ``false`` to prevent caching of this
79
+ :method:`db.collection.ensureIndex()` call in
80
+ the index cache.
81
+
72
82
:option Boolean dropDups: Specify ``true`` when creating a unique
73
83
index, on a field that *may* have
74
84
duplicate to index only the first
You can’t perform that action at this time.
0 commit comments