| 
 
update : 2015.11.03
 
php.shukuma.com검색:
  
 | 
MongoCollection::deleteIndex(PECL mongo >=0.9.0) MongoCollection::deleteIndex — Deletes an index from this collection 설명
   public array MongoCollection::deleteIndex
    ( string|array  
  $keys
   )This method is identical to: 
<?phpEach index is given a unique name when it is created. This is often generated by the driver based on the index key(s) and order/type, but custom names may also be specified with MongoCollection::createIndex()'s "name" option). Unfortunately, MongoCollection::deleteIndex() cannot delete custom-named indexes due to a backwards compatibility issue. When a string argument is provided, it is assumed to be the single field name in an ascending index (e.g. the name "x_1" would be used for the argument "x"). If an array or object is provided, an index name is generated just as if that argument was passed to MongoCollection::createIndex(). In order to delete a custom-named index with the PHP driver, the deleteIndexes database command must be used. For instance, an index named "myIndex" could be deleted with the PHP driver by running: 
<?phpTo determine the name of an index with the PHP driver, you can query the system.indexes collection of a database and look for the "name" field of each result. The "ns" field will indicate the collection to which each index belongs. 인수
 
 반환값Returns the database response. 예제Example #1 MongoCollection::deleteIndex() example This example passes the function string and array parameters. 
<?php참고
  |