YUKI Hiroshi
null+****@clear*****
Wed May 28 13:30:31 JST 2014
YUKI Hiroshi 2014-05-28 13:30:31 +0900 (Wed, 28 May 2014) New Revision: 6bea7f3de34767eb6f54a184a4bbacdd85906b4e https://github.com/droonga/droonga.org/commit/6bea7f3de34767eb6f54a184a4bbacdd85906b4e Message: Add descriptions for HTTP and REST Modified files: _po/ja/reference/1.0.3/commands/search/index.po ja/reference/1.0.3/commands/search/index.md reference/1.0.3/commands/search/index.md Modified: _po/ja/reference/1.0.3/commands/search/index.po (+141 -2) =================================================================== --- _po/ja/reference/1.0.3/commands/search/index.po 2014-05-28 13:01:27 +0900 (0b7c142) +++ _po/ja/reference/1.0.3/commands/search/index.po 2014-05-28 13:30:31 +0900 (664710d) @@ -41,6 +41,143 @@ msgstr "" "これは、Droonga において検索機能を提供する最も低レベルのコマンドです。\n" "検索用のコマンドをプラグインとして実装する際は、内部的にこのコマンドを使用して検索を行うという用途が想定されます。" +msgid "## Protocols {#protocols}" +msgstr "## プロトコル {#protocols}" + +msgid "### HTTP {#protocols-http}" +msgstr "" + +msgid "" +"Request endpoint\n" +": `(Document Root)/droonga/search`" +msgstr "" +"リクエスト先\n" +": `(ドキュメントルート)/droonga/search`" + +msgid "" +"Request methd\n" +": `POST`" +msgstr "" +"リクエストメソッド\n" +": `POST`" + +msgid "" +"Request URL parameters\n" +": Nothing." +msgstr "" +"リクエストのURLパラメータ\n" +": なし。" + +msgid "" +"Request body\n" +": A hash of [parameters](#parameters)." +msgstr "" +"リクエストのbody\n" +": [パラメータ](#parameters)のハッシュ。" + +msgid "" +"Response body\n" +": A [response message](#response)." +msgstr "" +"レスポンスのbody\n" +": [レスポンスメッセージ](#response)。" + +msgid "### REST {#protocols-rest}" +msgstr "" + +msgid "" +"Request endpoint\n" +": `(Document Root)/tables/(table name)`" +msgstr "" +"リクエスト先\n" +": `(ドキュメントルート)/tables/(テーブル名)`" + +msgid "" +"Request methd\n" +": `GET`" +msgstr "" +"リクエストメソッド\n" +": `GET`" + +msgid "" +"Request URL parameters\n" +": They are applied to corresponding [parameters](#parameters):" +msgstr "" +"リクエストのURLパラメータ\n" +": [検索リクエストのパラメータ](#parameters)に対応する以下のパラメータを受け付けます:" + +msgid "" +" * `query`: A string, applied to [`(root).(table name).condition.query`](#us" +"age-condition-query-syntax).\n" +" * `match_to`: A comma-separated string, applied to [`(root).(table name).co" +"ndition.matchTo`](#usage-condition-query-syntax).\n" +" * `sort_by`: A comma-separated string, applied to [`(root).(table name).sor" +"tBy`](#query-sortBy).\n" +" * `attributes`: A comma-separated string, applied to [`(root).(table name)." +"output.attributes`](#query-output).\n" +" * `offset`: An integer, applied to [`(root).(table name).output.offset`](#q" +"uery-output).\n" +" * `limit`: An integer, applied to [`(root).(table name).output.limit`](#que" +"ry-output).\n" +"<!--\n" +" * `group_by[(column name)][key]`: A string, applied to [`(root).(column nam" +"e).groupBy.key`](#query-groupBy).\n" +" * `group_by[(column name)][max_n_sub_records]`: An integer, applied to [`(r" +"oot).(column name).groupBy.maxNSubRecords`](#query-groupBy).\n" +" * `group_by[(column name)][attributes]`: A comma-separated string, applied " +"to [`(root).(column name).output.attributes`](#query-output).\n" +" * `group_by[(column name)][attributes][(attribute name)][source]`: A string" +", applied to [`(root).(column name).output.attributes.(attribute name).source`" +"](#query-output).\n" +" * `group_by[(column name)][attributes][(attribute name)][attributes]`: A co" +"mma-separated string, applied to [`(root).(column name).output.attributes.(att" +"ribute name).attributes`](#query-output).\n" +" * `group_by[(column name)][limit]`: An integer, applied to [`(root).(column" +" name).output.limit`](#query-output).\n" +"-->\n" +" * `timeout`: An integer, applied to [`(root).timeout`](#parameter-timeout)." +msgstr "" +" * `query`: [`(root).(テーブル名).condition.query`](#usage-condition-query-syntax" +") に対応する文字列。\n" +" * `match_to`: [`(root).(テーブル名).condition.matchTo`](#usage-condition-query-s" +"yntax) に対応するカンマ区切りの文字列。\n" +" * `sort_by`: [`(root).(テーブル名).sortBy`](#query-sortBy) に対応するカンマ区切りの文字列。\n" +" * `attributes`: [`(root).(テーブル名).output.attributes`](#query-output) に対応するカン" +"マ区切りの文字列。\n" +" * `offset`: [`(root).(テーブル名).output.offset`](#query-output) に対応する整数。\n" +" * `limit`: [`(root).(テーブル名).output.limit`](#query-output) に対応する整数。\n" +" * `timeout`: [`(root).timeout`](#parameter-timeout) に対応する整数。" + +msgid " For example:" +msgstr " 例:" + +msgid "" +" * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10`\n" +"<!--\n" +" * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by" +"[location][key]=location&group_by[location][limit]=5&group_by[location][attrib" +"utes]=_key,_nsubrecs`\n" +" * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by" +"[location][key]=location&group_by[location][limit]=5&group_by[location][attrib" +"utes][_key][souce]=_key&group_by[location][attributes][_nsubrecs][souce]=_nsub" +"recs`\n" +" * `/tables/Store?query=NY&match_to=_key&limit=0&group_by[location][key]=loc" +"ation&group_by[location][max_n_sub_records]=5&group_by[location][limit]=5&grou" +"p_by[location][attributes][sub_records][source]=_subrecs&group_by[location][at" +"tributes][sub_records][attributes]=_key,location`\n" +"-->" +msgstr "" + +msgid "" +"Request body\n" +": Nothing." +msgstr "" +"リクエストのbody\n" +": なし。" + +msgid "### Fluentd {#protocols-fluentd}" +msgstr "" + msgid "" "Style\n" ": Request-Response. One response message is always returned per one request." @@ -57,10 +194,10 @@ msgstr "" msgid "" "`body` of the request\n" -": A hash of parameters." +": A hash of [parameters](#parameters)." msgstr "" "リクエストの `body`\n" -": パラメータのハッシュ。" +": [パラメータ](#parameters)のハッシュ。" msgid "" "`type` of the response\n" @@ -1659,6 +1796,8 @@ msgid "" " 1. An array of column definitions.\n" " 2. A hash of column definitions." msgstr "" +" 1. カラムの定義の配列。\n" +" 2. カラムの定義のハッシュ。" msgid " Each column can be defined in one of following styles:" msgstr " 各カラムは以下の形式のいずれかで指定します。" Modified: ja/reference/1.0.3/commands/search/index.md (+58 -3) =================================================================== --- ja/reference/1.0.3/commands/search/index.md 2014-05-28 13:01:27 +0900 (0c6454d) +++ ja/reference/1.0.3/commands/search/index.md 2014-05-28 13:30:31 +0900 (656cdb4) @@ -22,6 +22,61 @@ layout: ja これは、Droonga において検索機能を提供する最も低レベルのコマンドです。 検索用のコマンドをプラグインとして実装する際は、内部的にこのコマンドを使用して検索を行うという用途が想定されます。 +## プロトコル {#protocols} + +### HTTP {#protocols-http} + +リクエスト先 +: `(ドキュメントルート)/droonga/search` + +リクエストメソッド +: `POST` + +リクエストのURLパラメータ +: なし。 + +リクエストのbody +: [パラメータ](#parameters)のハッシュ。 + +レスポンスのbody +: [レスポンスメッセージ](#response)。 + +### REST {#protocols-rest} + +リクエスト先 +: `(ドキュメントルート)/tables/(テーブル名)` + +リクエストメソッド +: `GET` + +リクエストのURLパラメータ +: [検索リクエストのパラメータ](#parameters)に対応する以下のパラメータを受け付けます: + + * `query`: [`(root).(テーブル名).condition.query`](#usage-condition-query-syntax) に対応する文字列。 + * `match_to`: [`(root).(テーブル名).condition.matchTo`](#usage-condition-query-syntax) に対応するカンマ区切りの文字列。 + * `sort_by`: [`(root).(テーブル名).sortBy`](#query-sortBy) に対応するカンマ区切りの文字列。 + * `attributes`: [`(root).(テーブル名).output.attributes`](#query-output) に対応するカンマ区切りの文字列。 + * `offset`: [`(root).(テーブル名).output.offset`](#query-output) に対応する整数。 + * `limit`: [`(root).(テーブル名).output.limit`](#query-output) に対応する整数。 + * `timeout`: [`(root).timeout`](#parameter-timeout) に対応する整数。 + + 例: + + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10` +<!-- + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by[location][key]=location&group_by[location][limit]=5&group_by[location][attributes]=_key,_nsubrecs` + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by[location][key]=location&group_by[location][limit]=5&group_by[location][attributes][_key][souce]=_key&group_by[location][attributes][_nsubrecs][souce]=_nsubrecs` + * `/tables/Store?query=NY&match_to=_key&limit=0&group_by[location][key]=location&group_by[location][max_n_sub_records]=5&group_by[location][limit]=5&group_by[location][attributes][sub_records][source]=_subrecs&group_by[location][attributes][sub_records][attributes]=_key,location` +--> + +リクエストのbody +: なし。 + +レスポンスのbody +: [レスポンスメッセージ](#response)。 + +### Fluentd {#protocols-fluentd} + 形式 : Request-Response型。コマンドに対しては必ず対応するレスポンスが返されます。 @@ -29,7 +84,7 @@ layout: ja : `search` リクエストの `body` -: パラメータのハッシュ。 +: [パラメータ](#parameters)のハッシュ。 レスポンスの `type` : `search.result` @@ -996,8 +1051,8 @@ Droongaはそのカラムの値が同じであるレコードを集約し、カ : レコードのカラムの値について、出力形式を配列で指定します。 個々のカラムの値の出力形式は以下のいずれかで指定します。 - 1. An array of column definitions. - 2. A hash of column definitions. + 1. カラムの定義の配列。 + 2. カラムの定義のハッシュ。 各カラムは以下の形式のいずれかで指定します。 Modified: reference/1.0.3/commands/search/index.md (+64 -1) =================================================================== --- reference/1.0.3/commands/search/index.md 2014-05-28 13:01:27 +0900 (458ddf3) +++ reference/1.0.3/commands/search/index.md 2014-05-28 13:30:31 +0900 (b6f1434) @@ -12,6 +12,69 @@ The `search` command finds records from the specified table based on given condi This is designed as the most basic (low layer) command on Droonga, to search information from a database. When you want to add a new plugin including "search" feature, you should develop it as just a wrapper of this command, instead of developing something based on more low level technologies. +## Protocols {#protocols} + +### HTTP {#protocols-http} + +Request endpoint +: `(Document Root)/droonga/search` + +Request methd +: `POST` + +Request URL parameters +: Nothing. + +Request body +: A hash of [parameters](#parameters). + +Response body +: A [response message](#response). + +### REST {#protocols-rest} + +Request endpoint +: `(Document Root)/tables/(table name)` + +Request methd +: `GET` + +Request URL parameters +: They are applied to corresponding [parameters](#parameters): + + * `query`: A string, applied to [`(root).(table name).condition.query`](#usage-condition-query-syntax). + * `match_to`: A comma-separated string, applied to [`(root).(table name).condition.matchTo`](#usage-condition-query-syntax). + * `sort_by`: A comma-separated string, applied to [`(root).(table name).sortBy`](#query-sortBy). + * `attributes`: A comma-separated string, applied to [`(root).(table name).output.attributes`](#query-output). + * `offset`: An integer, applied to [`(root).(table name).output.offset`](#query-output). + * `limit`: An integer, applied to [`(root).(table name).output.limit`](#query-output). +<!-- + * `group_by[(column name)][key]`: A string, applied to [`(root).(column name).groupBy.key`](#query-groupBy). + * `group_by[(column name)][max_n_sub_records]`: An integer, applied to [`(root).(column name).groupBy.maxNSubRecords`](#query-groupBy). + * `group_by[(column name)][attributes]`: A comma-separated string, applied to [`(root).(column name).output.attributes`](#query-output). + * `group_by[(column name)][attributes][(attribute name)][source]`: A string, applied to [`(root).(column name).output.attributes.(attribute name).source`](#query-output). + * `group_by[(column name)][attributes][(attribute name)][attributes]`: A comma-separated string, applied to [`(root).(column name).output.attributes.(attribute name).attributes`](#query-output). + * `group_by[(column name)][limit]`: An integer, applied to [`(root).(column name).output.limit`](#query-output). +--> + * `timeout`: An integer, applied to [`(root).timeout`](#parameter-timeout). + + For example: + + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10` +<!-- + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by[location][key]=location&group_by[location][limit]=5&group_by[location][attributes]=_key,_nsubrecs` + * `/tables/Store?query=NY&match_to=_key&attributes=_key,*&limit=10&group_by[location][key]=location&group_by[location][limit]=5&group_by[location][attributes][_key][souce]=_key&group_by[location][attributes][_nsubrecs][souce]=_nsubrecs` + * `/tables/Store?query=NY&match_to=_key&limit=0&group_by[location][key]=location&group_by[location][max_n_sub_records]=5&group_by[location][limit]=5&group_by[location][attributes][sub_records][source]=_subrecs&group_by[location][attributes][sub_records][attributes]=_key,location` +--> + +Request body +: Nothing. + +Response body +: A [response message](#response). + +### Fluentd {#protocols-fluentd} + Style : Request-Response. One response message is always returned per one request. @@ -19,7 +82,7 @@ Style : `search` `body` of the request -: A hash of parameters. +: A hash of [parameters](#parameters). `type` of the response : `search.result` -------------- next part -------------- HTML����������������������������... Download