mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix example output for MongoCollection::getIndexInfo()
The previous output looked nothing like var_dump(). The indexes are are comparable to those in the previous example, although there are some additional fields and I changed the geo-spatial index to "2dsphere". git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335757 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
2fba051b83
commit
96ac68c599
1 changed files with 62 additions and 36 deletions
|
@ -51,42 +51,68 @@ var_dump($c->getIndexInfo());
|
|||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
array(
|
||||
0 => array(
|
||||
"v" => 1,
|
||||
"key" => array(
|
||||
"_id" => 1,
|
||||
),
|
||||
"ns" => "test.venues",
|
||||
"name" => "_id_",
|
||||
),
|
||||
1 => array(
|
||||
"v" => 1,
|
||||
"key" => array(
|
||||
"name" => 1,
|
||||
),
|
||||
"unique" : true,
|
||||
"ns" => "test.venues",
|
||||
"name" => "name_1",
|
||||
),
|
||||
2 => array(
|
||||
"v" => 1,
|
||||
"key" => array(
|
||||
"type" => 1,
|
||||
"createdAt" => -1,
|
||||
),
|
||||
"ns" => "test.venues",
|
||||
"name" => "type_1_createdAt_-1",
|
||||
),
|
||||
3 => array(
|
||||
"v" => 1,
|
||||
"key" => array(
|
||||
"location" => "2d",
|
||||
),
|
||||
"ns" => "test.venues",
|
||||
"name" => "location_2d",
|
||||
),
|
||||
)
|
||||
array(4) {
|
||||
[0]=>
|
||||
array(4) {
|
||||
["v"]=>
|
||||
int(1)
|
||||
["key"]=>
|
||||
array(1) {
|
||||
["_id"]=>
|
||||
int(1)
|
||||
}
|
||||
["name"]=>
|
||||
string(4) "_id_"
|
||||
["ns"]=>
|
||||
string(11) "test.venues"
|
||||
}
|
||||
[1]=>
|
||||
array(4) {
|
||||
["v"]=>
|
||||
int(1)
|
||||
["key"]=>
|
||||
array(1) {
|
||||
["name"]=>
|
||||
float(1)
|
||||
}
|
||||
["name"]=>
|
||||
string(6) "name_1"
|
||||
["ns"]=>
|
||||
string(11) "test.venues"
|
||||
}
|
||||
[2]=>
|
||||
array(4) {
|
||||
["v"]=>
|
||||
int(1)
|
||||
["key"]=>
|
||||
array(2) {
|
||||
["type"]=>
|
||||
float(1)
|
||||
["createdAt"]=>
|
||||
float(-1)
|
||||
}
|
||||
["name"]=>
|
||||
string(19) "type_1_createdAt_-1"
|
||||
["ns"]=>
|
||||
string(11) "test.venues"
|
||||
}
|
||||
[3]=>
|
||||
array(5) {
|
||||
["v"]=>
|
||||
int(1)
|
||||
["key"]=>
|
||||
array(1) {
|
||||
["location"]=>
|
||||
string(8) "2dsphere"
|
||||
}
|
||||
["name"]=>
|
||||
string(17) "location_2dsphere"
|
||||
["ns"]=>
|
||||
string(11) "test.venues"
|
||||
["2dsphereIndexVersion"]=>
|
||||
int(2)
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue