[Groonga-commit] droonga/droonga.org at 554e068 [gh-pages] Fix tutorial to catch up with the latest version

Back to archive index

Yoji Shidara null+****@clear*****
Fri Nov 29 11:36:37 JST 2013


Yoji Shidara	2013-11-29 11:36:37 +0900 (Fri, 29 Nov 2013)

  New Revision: 554e068b86e7acb2acab5466d3808c6c7d19f480
  https://github.com/droonga/droonga.org/commit/554e068b86e7acb2acab5466d3808c6c7d19f480

  Message:
    Fix tutorial to catch up with the latest version

  Modified files:
    ja/tutorial/index.md

  Modified: ja/tutorial/index.md (+6 -4)
===================================================================
--- ja/tutorial/index.md    2013-11-29 10:53:52 +0900 (038afa5)
+++ ja/tutorial/index.md    2013-11-29 11:36:37 +0900 (4b0c755)
@@ -318,7 +318,7 @@ application.js:
 
 準備が整いました。 Protocol Adapter に向けて HTTP 経由でリクエストを発行し、データベースに問い合わせを行ってみましょう。まずは `Shops` テーブルの中身を取得してみます。以下のようなリクエストを用います。(`attributes=_key` を指定しているのは「検索結果に `_key` 値を含めて返してほしい」という意味です。これがないと、`records` に何も値がないレコードが返ってきてしまいます。`attributes` パラメータには `,` 区切りで複数の属性を指定することができます。`attributes=_key,location` と指定することで、緯度経度もレスポンスとして受け取ることができます)
 
-    $ curl "http://localhost:3000/droonga/tables/Shop?attrbutes=_key"
+    $ curl "http://localhost:3000/droonga/tables/Shop?attributes=_key&limit=-1"
     {
       "result": {
         "count": 36,
@@ -392,7 +392,7 @@ application.js:
 もう少し複雑なクエリを試してみましょう。例えば、店名に「阿佐ヶ谷」を含むたいやき屋を検索します。`query` パラメータにクエリ `阿佐ヶ谷` を URL エンコードした `%E9%98%BF%E4%BD%90%E3%83%B6%E8%B0%B7` を、`match_to` パラメータに検索対象として `_key` を指定し、以下のようなリクエストを発行します。
 
 
-    $ curl "http://localhost:3000/droonga/tables/Shop?query=%E9%98%BF%E4%BD%90%E3%83%B6%E8%B0%B7&match_to=_key&attributes=_key"
+    $ curl "http://localhost:3000/droonga/tables/Shop?query=%E9%98%BF%E4%BD%90%E3%83%B6%E8%B0%B7&match_to=_key&attributes=_key&limit=-1"
     {
       "result": {
         "count": 2,
@@ -441,7 +441,8 @@ index.html:
                    'attributes',
                    'records'
                  ],
-                 attributes: ['_key']
+                 attributes: ['_key'],
+                 limit: -1
               }
             }
           }});
@@ -524,7 +525,8 @@ Web ブラウザから Socket.IO 経由でリクエストが Protocol Adapter 
                    'attributes',
                    'records'
                  ],
-                 attributes: ['_key']
+                 attributes: ['_key'],
+                 limit: -1
               }
             }
           }});
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index