svn: /phpdoc/ja/trunk/reference/mongo/mongocollection/ ensureindex.xml getindexinfo.xml

From: Date: Tue, 29 Jan 2013 22:54:51 +0000
Subject: svn: /phpdoc/ja/trunk/reference/mongo/mongocollection/ ensureindex.xml getindexinfo.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-3686@lists.php.net to get a copy of this message
takagi Tue, 29 Jan 2013 22:54:51 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=329360 Log: Sync with en Changed paths: U phpdoc/ja/trunk/reference/mongo/mongocollection/ensureindex.xml U phpdoc/ja/trunk/reference/mongo/mongocollection/getindexinfo.xml Modified: phpdoc/ja/trunk/reference/mongo/mongocollection/ensureindex.xml =================================================================== --- phpdoc/ja/trunk/reference/mongo/mongocollection/ensureindex.xml 2013-01-29 22:43:41 UTC (rev 329359) +++ phpdoc/ja/trunk/reference/mongo/mongocollection/ensureindex.xml 2013-01-29 22:54:51 UTC (rev 329360) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 328545 Maintainer: takagi Status: ready --> +<!-- EN-Revision: 329342 Maintainer: takagi Status: ready --> <refentry xml:id="mongocollection.ensureindex" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> @@ -147,8 +147,14 @@ <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> + <literal>"w"</literal> オプションが設定されている場合は、 + インデックスの作成の状態を含む配列を返します。それ以外の場合は &true; を返します。 </para> + <para> + 配列のフィールドについての説明は + <function>MongoCollection::insert</function> を参照ください。 + </para> </refsect1> <refsect1 role="changelog"> Modified: phpdoc/ja/trunk/reference/mongo/mongocollection/getindexinfo.xml =================================================================== --- phpdoc/ja/trunk/reference/mongo/mongocollection/getindexinfo.xml 2013-01-29 22:43:41 UTC (rev 329359) +++ phpdoc/ja/trunk/reference/mongo/mongocollection/getindexinfo.xml 2013-01-29 22:54:51 UTC (rev 329360) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 319493 Maintainer: takagi Status: ready --> +<!-- EN-Revision: 329340 Maintainer: takagi Status: ready --> <refentry xml:id="mongocollection.getindexinfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> @@ -17,81 +17,90 @@ </refsect1> <refsect1 role="parameters"> - &reftitle.parameters; + &reftitle.parameters; &no.function.parameters; </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> - この関数は、配列を返します。配列の各要素が、それぞれ配列になっています。 + この関数は、配列を返します。配列の各要素が、それぞれインデックスを表します。 その要素には、インデックス名を表す <literal>name</literal> や名前空間 - (コレクション名) を表す <literal>ns</literal>、すべてのキーとそのソート順 - (インデックスを作るもの) を表す <literal>key</literal>、 - そしてこのインデックスの ID を表す MongoID オブジェクトを含む <literal>_id</literal> - があります。 + (データベース名とコレクション名の組み合わせ) を表す <literal>ns</literal>、すべてのキーとそのソート順 + (インデックスを作るもの) を表す <literal>key</literal> があります。 + また、それ以外の値も特別なインデックスに含まれるかもしれません。 + <literal>unique</literal> や <literal>sparse</literal> などです。 </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <example> - <title><function>MongoCollection::find</function> の例</title> - <para>この例では、範囲検索の方法を説明します。</para> + <title><function>MongoCollection::getIndexInfo</function> の例</title> <programlisting role="php"> <![CDATA[ <?php -$m = new Mongo; -$c = $m->selectCollection('project', 'outfits'); +$m = new MongoClient(); +$c = $m->selectCollection('test', 'venues'); var_dump($c->getIndexInfo()); ?> ]]> </programlisting> - &example.outputs; + &example.outputs.similar; <screen> <![CDATA[ -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' - } -} +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", + ), +) ]]> </screen> - <para> - カーソルの動きに関する詳細な情報は <classname>MongoCursor</classname> を参照ください。 - </para> </example> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + MongoDB コアドキュメントの + <link xlink:href="&url.mongodb.dochub.indexes;">vanilla indexes</link> や + <link xlink:href="&url.mongodb.dochub.geo;">geospatial indexes</link> も参照ください。 + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables:

« previous php.doc.ja (#3686) next »