Kouhei Sutou
null+****@clear*****
Tue Nov 7 10:35:00 JST 2017
Kouhei Sutou 2017-11-07 10:35:00 +0900 (Tue, 07 Nov 2017) New Revision: 997003ac8a5cb122f41dc13e4ef1085bc5a9772c https://github.com/groonga/groonga/commit/997003ac8a5cb122f41dc13e4ef1085bc5a9772c Message: doc logical_range_filter: add more documents Added files: doc/source/example/reference/commands/logical_range_filter/limit.log doc/source/example/reference/commands/logical_range_filter/offset.log doc/source/example/reference/commands/logical_range_filter/output_columns.log Modified files: doc/locale/ja/LC_MESSAGES/reference.po doc/source/reference/commands/logical_range_filter.rst doc/source/reference/commands/select.rst Modified: doc/locale/ja/LC_MESSAGES/reference.po (+103 -62) =================================================================== --- doc/locale/ja/LC_MESSAGES/reference.po 2017-11-07 09:45:56 +0900 (239355888) +++ doc/locale/ja/LC_MESSAGES/reference.po 2017-11-07 10:35:00 +0900 (6a12552e6) @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.2.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2017-11-07 09:44+0900\n" +"PO-Revision-Date: 2017-11-07 10:33+0900\n" "Last-Translator: Masafumi Yokoyama <yokoyama �� clear-code.com>\n" "Language-Team: Japanese\n" "Language: ja\n" @@ -7489,6 +7489,42 @@ msgstr "" msgid "``order``" msgstr "" +msgid "Output related parameters" +msgstr "出力関連の引数" + +msgid "" +"Corresponds to :ref:`select-output-columns` in :doc:`select`. See :ref:" +"`select-output-columns` for details." +msgstr "" +":doc:`select` の :ref:`select-output-columns` に対応しています。詳細は :ref:" +"`select-output-columns` を見てください。" + +msgid "" +"Corresponds to :ref:`select-offset` in :doc:`select`. See :ref:`select-" +"offset` for details." +msgstr "" +":doc:`select` の :ref:`select-offset` に対応しています。詳細は :ref:`select-" +"offset` を見てください。" + +msgid "" +"Corresponds to :ref:`select-limit` in :doc:`select`. See :ref:`select-limit` " +"for details." +msgstr "" +":doc:`select` の :ref:`select-limit` に対応しています。詳細は :ref:`select-" +"limit` を見てください。" + +msgid "" +"The difference from :doc:`select` is that this command stops searching when " +"all requested records specified by :ref:`logical-range-filter-offset` and :" +"ref:`logical-range-filter-limit` are found." +msgstr "" +":doc:`select` との違いは、このコマンドは :ref:`logical-range-filter-offset` " +"と :ref:`logical-range-filter-limit` で指定したレコードを見つけたら検索を終了" +"することです。" + +msgid "Test related parameters" +msgstr "テスト関連の引数" + msgid "``use_range_index``" msgstr "" @@ -7706,6 +7742,72 @@ msgstr "このクエリーの出力をキャッシュする。デフォルト値 msgid "Here is an example to disable caching the result of this query:" msgstr "このクエリーの結果をキャッシュしないようにする例です。" +msgid "The command returns a response with the following format::" +msgstr "このコマンドは以下のフォーマットのレスポンスを返します::" + +msgid "" +"``COLUMNS`` describes about output columns specified by :ref:`logical-range-" +"filter-output-columns`. It uses the following format::" +msgstr "" +"``COLUMNS`` は :ref:`logical-range-filter-output-columns` で指定した出力カラ" +"ムの情報を表しています。これは次のフォーマットになっています::" + +msgid "" +"``COLUMNS`` includes one or more output column information. Each output " +"column information includes the followings:" +msgstr "" +"``COLUMNS`` は1つ以上の出力カラムの情報を含んでいます。各出力カラムの情報は次" +"の情報を含んでいます。" + +msgid "Column name as string" +msgstr "カラム名(文字列)" + +msgid "Column type as string or ``null``" +msgstr "カラムの型(文字列または ``null`` )" + +msgid "" +"Column name is extracted from value specified as :ref:`logical-range-filter-" +"output-columns`." +msgstr "" +"カラム名は :ref:`logical-range-filter-output-columns` で指定された値から抽出" +"しています。" + +msgid "" +"Column type is Groonga's type name or ``null``. It doesn't describe whether " +"the column value is vector or scalar. You need to determine it by whether " +"real column value is array or not." +msgstr "" +"カラムの方はGroongaでの型名または ``null`` です。カラムがベクターかスカラーか" +"の情報は持っていません。実際のカラムの値が配列かどうかで判断する必要がありま" +"す。" + +msgid "See :doc:`/reference/types` for type details." +msgstr "型の詳細は :doc:`/reference/types` を見てください。" + +msgid "" +"``null`` is used when column value type isn't determined. For example, " +"function call in :ref:`logical-range-filter-output-columns` such as ``--" +"output_columns \"snippet_html(content)\"`` uses ``null``." +msgstr "" +"``null`` になるときはカラムの値の型を決められないときです。たとえば、 ``--" +"output_columns \"snippet_html(content)\"`` というように :ref:`logical-range-" +"filter-output-columns` の中で関数呼び出しを使ったときは ``null`` になります。" + +msgid "Here is an example of ``COLUMNS``::" +msgstr "以下は ``COLUMNS`` の使用例です::" + +msgid "" +"``RECORDS`` includes column values for each matched record. Included records " +"are selected by :ref:`logical-range-filter-offset` and :ref:`logical-range-" +"filter-limit`. It uses the following format::" +msgstr "" +"``RECORDS`` はマッチした各レコードのカラムの値を含んでいます。 ``RECORDS`` に" +"含まれるレコードは :ref:`logical-range-filter-offset` と :ref:`logical-range-" +"filter-limit` で選択されたレコードです。 ``RECORDS`` は次のフォーマットです::" + +msgid "Here is an example ``RECORDS``::" +msgstr "以下は ``RECORDS`` の例です::" + msgid "``logical_select``" msgstr "" @@ -8048,16 +8150,6 @@ msgstr "" msgid "``query_expander``" msgstr "" -msgid "Output related parameters" -msgstr "出力関連の引数" - -msgid "" -"Corresponds to :ref:`select-output-columns` in :doc:`select`. See :ref:" -"`select-output-columns` for details." -msgstr "" -":doc:`select` の :ref:`select-output-columns` に対応しています。詳細は :ref:" -"`select-output-columns` を見てください。" - msgid "Use :ref:`logical-select-sort-keys` instead." msgstr "代わりに :ref:`logical-select-sort-keys` を使ってください。" @@ -8097,20 +8189,6 @@ msgid "Here is an example that uses only one shard:" msgstr "以下は1つのシャードのみを使っている例です。" msgid "" -"Corresponds to :ref:`select-offset` in :doc:`select`. See :ref:`select-" -"offset` for details." -msgstr "" -":doc:`select` の :ref:`select-offset` に対応しています。詳細は :ref:`select-" -"offset` を見てください。" - -msgid "" -"Corresponds to :ref:`select-limit` in :doc:`select`. See :ref:`select-limit` " -"for details." -msgstr "" -":doc:`select` の :ref:`select-limit` に対応しています。詳細は :ref:`select-" -"limit` を見てください。" - -msgid "" "You need to specify :doc:`/reference/window_function` as ``value`` value and " "other window function related parameters when you use window function. See :" "ref:`logical-select-window-function-related-parameters` for details." @@ -14301,12 +14379,6 @@ msgstr "" "を変えることができます。これは検索スコアーをチューニングするときに便利です。" "詳細は :ref:`weight-vector-column` を参照してください。" -msgid "``select`` returns response with the following format::" -msgstr "``select`` は以下のフォーマットのレスポンスを返します::" - -msgid "If ``select`` fails, error details are in ``HEADER``." -msgstr "``select`` が失敗すると、 ``HEADER`` にエラーの詳細が含まれます。" - msgid "" "There are zero or more ``DRILLDOWN_RESULT``. If no ``drilldown`` and " "``drilldowns[${LABEL}].keys`` are specified, they are omitted like the " @@ -14357,37 +14429,12 @@ msgstr "" "ています。これは次のフォーマットになっています::" msgid "" -"``COLUMNS`` includes one or more output column information. Each output " -"column information includes the followings:" -msgstr "" -"``COLUMNS`` は1つ以上の出力カラムの情報を含んでいます。各出力カラムの情報は次" -"の情報を含んでいます。" - -msgid "Column name as string" -msgstr "カラム名(文字列)" - -msgid "Column type as string or ``null``" -msgstr "カラムの型(文字列または ``null`` )" - -msgid "" "Column name is extracted from value specified as :ref:`select-output-" "columns`." msgstr "" "カラム名は :ref:`select-output-columns` で指定された値から抽出しています。" msgid "" -"Column type is Groonga's type name or ``null``. It doesn't describe whether " -"the column value is vector or scalar. You need to determine it by whether " -"real column value is array or not." -msgstr "" -"カラムの方はGroongaでの型名または ``null`` です。カラムがベクターかスカラーか" -"の情報は持っていません。実際のカラムの値が配列かどうかで判断する必要がありま" -"す。" - -msgid "See :doc:`/reference/types` for type details." -msgstr "型の詳細は :doc:`/reference/types` を見てください。" - -msgid "" "``null`` is used when column value type isn't determined. For example, " "function call in :ref:`select-output-columns` such as ``--output_columns " "\"snippet_html(content)\"`` uses ``null``." @@ -14396,9 +14443,6 @@ msgstr "" "output_columns \"snippet_html(content)\"`` というように :ref:`select-output-" "columns` の中で関数呼び出しを使ったときは ``null`` になります。" -msgid "Here is an example of ``COLUMNS``::" -msgstr "以下は ``COLUMNS`` の使用例です::" - msgid "" "``RECORDS`` includes column values for each matched record. Included records " "are selected by :ref:`select-offset` and :ref:`select-limit`. It uses the " @@ -14408,9 +14452,6 @@ msgstr "" "含まれるレコードは :ref:`select-offset` と :ref:`select-limit` で選択されたレ" "コードです。 ``RECORDS`` は次のフォーマットです::" -msgid "Here is an example ``RECORDS``::" -msgstr "以下は ``RECORDS`` の例です::" - msgid "" "``DRILLDOWN_RESULT`` format is different between ``drilldown`` and " "``drilldowns[${LABEL}].keys``." Added: doc/source/example/reference/commands/logical_range_filter/limit.log (+51 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_range_filter/limit.log 2017-11-07 10:35:00 +0900 (e1470d88d) @@ -0,0 +1,51 @@ +Execution example:: + + logical_range_filter \ + --logical_table Entries \ + --shard_key created_at \ + --limit 2 + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # "_key", + # "ShortText" + # ], + # [ + # "content", + # "Text" + # ], + # [ + # "created_at", + # "Time" + # ], + # [ + # "n_likes", + # "UInt32" + # ], + # [ + # "tag", + # "ShortText" + # ] + # ], + # [ + # "The first post!", + # "Welcome! This is my first post!", + # 1436281200.0, + # 5, + # "Hello" + # ], + # [ + # "Groonga", + # "I started to use Groonga. It's very fast!", + # 1436284800.0, + # 10, + # "Groonga" + # ] + # ] + # ] Added: doc/source/example/reference/commands/logical_range_filter/offset.log (+58 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_range_filter/offset.log 2017-11-07 10:35:00 +0900 (8fafc247a) @@ -0,0 +1,58 @@ +Execution example:: + + logical_range_filter \ + --logical_table Entries \ + --shard_key created_at \ + --offset 2 + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # "_key", + # "ShortText" + # ], + # [ + # "content", + # "Text" + # ], + # [ + # "created_at", + # "Time" + # ], + # [ + # "n_likes", + # "UInt32" + # ], + # [ + # "tag", + # "ShortText" + # ] + # ], + # [ + # "Mroonga", + # "I also started to use Mroonga. It's also very fast! Really fast!", + # 1436288400.0, + # 15, + # "Groonga" + # ], + # [ + # "Good-bye Senna", + # "I migrated all Senna system!", + # 1436367600.0, + # 3, + # "Senna" + # ], + # [ + # "Good-bye Tritonn", + # "I also migrated all Tritonn system!", + # 1436371200.0, + # 3, + # "Senna" + # ] + # ] + # ] Added: doc/source/example/reference/commands/logical_range_filter/output_columns.log (+72 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_range_filter/output_columns.log 2017-11-07 10:35:00 +0900 (530c7ed25) @@ -0,0 +1,72 @@ +Execution example:: + + logical_range_filter \ + --logical_table Entries \ + --shard_key created_at \ + --output_columns '_key, *' + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # "_key", + # "ShortText" + # ], + # [ + # "content", + # "Text" + # ], + # [ + # "created_at", + # "Time" + # ], + # [ + # "n_likes", + # "UInt32" + # ], + # [ + # "tag", + # "ShortText" + # ] + # ], + # [ + # "The first post!", + # "Welcome! This is my first post!", + # 1436281200.0, + # 5, + # "Hello" + # ], + # [ + # "Groonga", + # "I started to use Groonga. It's very fast!", + # 1436284800.0, + # 10, + # "Groonga" + # ], + # [ + # "Mroonga", + # "I also started to use Mroonga. It's also very fast! Really fast!", + # 1436288400.0, + # 15, + # "Groonga" + # ], + # [ + # "Good-bye Senna", + # "I migrated all Senna system!", + # 1436367600.0, + # 3, + # "Senna" + # ], + # [ + # "Good-bye Tritonn", + # "I also migrated all Tritonn system!", + # 1436371200.0, + # 3, + # "Senna" + # ] + # ] + # ] Modified: doc/source/reference/commands/logical_range_filter.rst (+149 -10) =================================================================== --- doc/source/reference/commands/logical_range_filter.rst 2017-11-07 09:45:56 +0900 (52671452e) +++ doc/source/reference/commands/logical_range_filter.rst 2017-11-07 10:35:00 +0900 (a886bee05) @@ -276,20 +276,67 @@ TODO TODO +Output related parameters +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. _logical-range-filter-output-columns: + +``output_columns`` +"""""""""""""""""" + +Corresponds to :ref:`select-output-columns` in :doc:`select`. See +:ref:`select-output-columns` for details. + +Here is an example: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_range_filter/output_columns.log +.. logical_range_filter \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --output_columns '_key, *' + +.. _logical-range-filter-offset: + ``offset`` """""""""" -TODO +Corresponds to :ref:`select-offset` in :doc:`select`. See +:ref:`select-offset` for details. + +Here is an example: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_range_filter/offset.log +.. logical_range_filter \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --offset 2 + +.. _logical-range-filter-limit: ``limit`` """"""""" -TODO +Corresponds to :ref:`select-limit` in :doc:`select`. See +:ref:`select-limit` for details. -``output_columns`` -"""""""""""""""""" +The difference from :doc:`select` is that this command stops searching +when all requested records specified by +:ref:`logical-range-filter-offset` and +:ref:`logical-range-filter-limit` are found. -TODO +Here is an example: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_range_filter/limit.log +.. logical_range_filter \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --limit 2 + +Test related parameters +^^^^^^^^^^^^^^^^^^^^^^^ ``use_range_index`` """"""""""""""""""" @@ -551,8 +598,100 @@ The default value is ``yes``. Return value ------------ -TODO - -:: - - [HEADER, LOGICAL_FILTERED] +The command returns a response with the following format:: + + [ + HEADER, + [ + COLUMNS, + RECORDS + ] + ] + +If the command fails, error details are in ``HEADER``. + +See :doc:`/reference/command/output_format` for ``HEADER``. + +``COLUMNS`` describes about output columns specified by +:ref:`logical-range-filter-output-columns`. It uses the following +format:: + + [ + [COLUMN_NAME_1, COLUMN_TYPE_1], + [COLUMN_NAME_2, COLUMN_TYPE_2], + ..., + [COLUMN_NAME_N, COLUMN_TYPE_N] + ] + +``COLUMNS`` includes one or more output column information. Each +output column information includes the followings: + + * Column name as string + * Column type as string or ``null`` + +Column name is extracted from value specified as +:ref:`logical-range-filter-output-columns`. + +Column type is Groonga's type name or ``null``. It doesn't describe +whether the column value is vector or scalar. You need to determine it +by whether real column value is array or not. + +See :doc:`/reference/types` for type details. + +``null`` is used when column value type isn't determined. For example, +function call in :ref:`logical-range-filter-output-columns` such as +``--output_columns "snippet_html(content)"`` uses ``null``. + +Here is an example of ``COLUMNS``:: + + [ + ["_id", "UInt32"], + ["_key", "ShortText"], + ["n_likes", "UInt32"], + ] + +``RECORDS`` includes column values for each matched record. Included +records are selected by :ref:`logical-range-filter-offset` and +:ref:`logical-range-filter-limit`. It uses the following format:: + + [ + [ + RECORD_1_COLUMN_1, + RECORD_1_COLUMN_2, + ..., + RECORD_1_COLUMN_N + ], + [ + RECORD_2_COLUMN_1, + RECORD_2_COLUMN_2, + ..., + RECORD_2_COLUMN_N + ], + ... + [ + RECORD_N_COLUMN_1, + RECORD_N_COLUMN_2, + ..., + RECORD_N_COLUMN_N + ] + ] + +Here is an example ``RECORDS``:: + + [ + [ + 1, + "The first post!", + 5 + ], + [ + 2, + "Groonga", + 10 + ], + [ + 3, + "Mroonga", + 15 + ] + ] Modified: doc/source/reference/commands/select.rst (+2 -3) =================================================================== --- doc/source/reference/commands/select.rst 2017-11-07 09:45:56 +0900 (d11a524c8) +++ doc/source/reference/commands/select.rst 2017-11-07 10:35:00 +0900 (e8163081f) @@ -2587,7 +2587,7 @@ the same ``"KEYWORD"``. It is useful to tune search score. See Return value ------------ -``select`` returns response with the following format:: +The command returns a response with the following format:: [ HEADER, @@ -2600,7 +2600,7 @@ Return value ] ] -If ``select`` fails, error details are in ``HEADER``. +If the command fails, error details are in ``HEADER``. See :doc:`/reference/command/output_format` for ``HEADER``. @@ -2794,7 +2794,6 @@ The following value part is the same format as ``SEARCH_RESULT``:: See also :ref:`select-drilldowns-label-output-format` for ``drilldowns[${LABEL}]`` style drilldown output format. - See also -------- -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171107/86e532d9/attachment-0001.htm