From 7c238b5b33b5953c220f1e726ec86cb70733a004 Mon Sep 17 00:00:00 2001 From: Ed Costello Date: Thu, 27 Sep 2012 09:56:16 -0400 Subject: [PATCH] DOCS-558 add name, cache options to db.collection.ensureIndex() --- source/reference/method/db.collection.ensureIndex.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/reference/method/db.collection.ensureIndex.txt b/source/reference/method/db.collection.ensureIndex.txt index 9aba92ea1c2..2757faff05c 100644 --- a/source/reference/method/db.collection.ensureIndex.txt +++ b/source/reference/method/db.collection.ensureIndex.txt @@ -52,6 +52,8 @@ db.collection.ensureIndex() ==================== ================= ========= background true or false false unique true or false false + name string none + cache true or false true dropDups true or false false sparse true or false false expireAfterSeconds integer none @@ -69,6 +71,14 @@ db.collection.ensureIndex() or keys matches an existing value in the index. + :option string name: Specify the name of the index. If unspecified, + the index name will be generated by concatenating + the names of the indexed fields and the sort order. + + :option Boolean cache: Specify ``false`` to prevent caching of this + :method:`db.collection.ensureIndex()` call in + the index cache. + :option Boolean dropDups: Specify ``true`` when creating a unique index, on a field that *may* have duplicate to index only the first