From dff0dee9c8fa5e2e2e9994c6d2c320e536a71e38 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 30 Dec 2011 10:13:06 +0000 Subject: [PATCH] More clarifications for indexes. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321552 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocollection/deleteindex.xml | 5 +++-- reference/mongo/mongocollection/ensureindex.xml | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/reference/mongo/mongocollection/deleteindex.xml b/reference/mongo/mongocollection/deleteindex.xml index 7ae17b3297..ff87161fa6 100644 --- a/reference/mongo/mongocollection/deleteindex.xml +++ b/reference/mongo/mongocollection/deleteindex.xml @@ -48,7 +48,8 @@ public function deleteIndexes($keys) { deleteIndexes database command. - Thus, if you named an index "superfast query", you could delete it with: + Thus, if you named an index "superfast query", you could only delete it + with the PHP driver by running: command(array("deleteIndexes" => $collection->getName(), "index" => "superf &reftitle.returnvalues; - Returns the database response. + Returns the generated name of the key if successful, or &null; otherwise. diff --git a/reference/mongo/mongocollection/ensureindex.xml b/reference/mongo/mongocollection/ensureindex.xml index 9a9fc9200c..c1e4240e4d 100644 --- a/reference/mongo/mongocollection/ensureindex.xml +++ b/reference/mongo/mongocollection/ensureindex.xml @@ -34,7 +34,10 @@ - Field or fields to use as index. + An array of fields by which to sort the index on. Each element in the + array has as key the field name, and as value either + 1 for ascending sort, or -1 for + descending sort.