MongoCollection::createDBRef
MongoCollection::deleteIndexes
MongoCollection
PHP Manual

# MongoCollection::deleteIndex

(PECL mongo >=0.9.0)

MongoCollection::deleteIndex — Deletes an index from this collection

### 설명

public array MongoCollection::deleteIndex ( string|array `$keys` )

### 인수

`keys`

  Field or fields from which to delete the index.

### 반환값

Returns the database response.

### 예제

Example #1 MongoCollection::deleteIndex() example

This example passes the function string and array parameters.

`<?php
$m = new Mongo();
$c = $m->selectCollection("example", "indices");
// create an index
$c->ensureIndex(array("i"=>1));
// remove a simple index
$c->deleteIndex("i");
// create a multi-key index
$c->ensureIndex(array("j" => 1, "k" => 1));
// remove a multi-key index
$c->deleteIndex(array("j" => 1, "k" => 1));
?>`

MongoCollection::createDBRef
MongoCollection::deleteIndexes
MongoCollection
PHP Manual