Skip to content

DOCS-558 add name, cache options to db.collection.ensureIndex() #265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/reference/method/db.collection.ensureIndex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down