From f14227dbc0b6cf4b36656aac62d971ab398b8ec5 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Fri, 29 Jun 2012 10:57:17 +0400 Subject: [PATCH] Document options monger.collection/ensure-index takes --- src/clojure/monger/collection.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/clojure/monger/collection.clj b/src/clojure/monger/collection.clj index 5ca1cee..36df675 100644 --- a/src/clojure/monger/collection.clj +++ b/src/clojure/monger/collection.clj @@ -454,7 +454,12 @@ (defn ensure-index "Creates an index on a set of fields, if one does not already exist. - This operation is optimized in the Java driver and is inexpensive in the case when an index already exists. + This operation is inexpensive in the case when an index already exists. + + Options are: + + :unique (boolean) to create a unique index + :name (string) to specify a custom index name and not rely on the generated one EXAMPLES