IT. Expert System.

PHP

Returns information about indexes on this collection


MongoCollection::getIndexInfo

(PECL mongo >=0.9.0)

MongoCollection::getIndexInfoReturns information about indexes on this collection

Description

public array MongoCollection::getIndexInfo ( void )

Parameters

This function has no parameters.

Return Values

This function returns an array in which each elements describes an array. The elements contain the values name for the name of the index, ns for the namespace (the name of the collection), key containing a list of all the keys and their sort order that make up the index and _id containing a MongoID object with the ID of this index.

Examples

Example #1 MongoCollection::find() example

This example demonstrates how to search for a range.

<?php

$m 
= new Mongo;
$c $m->selectCollection('project''outfits');
var_dump($c->getIndexInfo());

?>

The above example will output:

 array(8) { [0] => array(3) {  'name' =>  string(4) '_id_'  'ns' =>  string(12) 'project.outfits'  'key' =>  array(1) {  '_id' =>  int(1)  } } ... [7] => array(4) {  '_id' =>  class MongoId#12 (1) {  public $$id =>  string(24) '4d6f7abd44670a1513190000'  }  'ns' =>  string(12) 'project.outfits'  'key' =>  array(2) {  'created' =>  int(-1)  'userid' =>  int(1)  }  'name' =>  string(19) 'created_-1_userid_1' } } 

See MongoCursor for more information how to work with cursors.



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 63 / 158748775. Delta: 0.03071 с