YUKI Hiroshi
null+****@clear*****
Wed May 7 12:27:03 JST 2014
YUKI Hiroshi 2014-05-07 12:27:03 +0900 (Wed, 07 May 2014) New Revision: 5ac02be66d34a5202dd14bb77bf8cbbaffabe8ab https://github.com/droonga/droonga.org/commit/5ac02be66d34a5202dd14bb77bf8cbbaffabe8ab Message: Use 10041 instead of 3000 as the port number of the HTTP server. It is the default port number of Groonga. Modified files: _po/ja/tutorial/groonga/index.po ja/tutorial/groonga/index.md tutorial/groonga/index.md Modified: _po/ja/tutorial/groonga/index.po (+26 -25) =================================================================== --- _po/ja/tutorial/groonga/index.po 2014-05-07 12:25:23 +0900 (55281de) +++ _po/ja/tutorial/groonga/index.po 2014-05-07 12:27:03 +0900 (7c06b2f) @@ -209,7 +209,7 @@ msgstr "" msgid "You can run Groonga as an HTTP server with the option `-d`, like:" msgstr "" -msgid " # groonga -p 3000 -d --protocol http /tmp/databases/db" +msgid " # groonga -p 10041 -d --protocol http /tmp/databases/db" msgstr "" msgid "" @@ -225,7 +225,7 @@ msgid "" " # droonga-engine --host=192.168.0.10 \\\n" " --daemon \\\n" " --pid-file $PWD/droonga-engine.pid\n" -" # droonga-http-server --port=3000 \\\n" +" # droonga-http-server --port=10041 \\\n" " --receive-host-name=192.168.0.10 \\\n" " --droonga-engine-host-name=192.168.0.10 \\\n" " --default-dataset=Starbucks \\\n" @@ -267,8 +267,8 @@ msgid "" msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/table_create?name=Store&type=Hash&key_t" -"ype=ShortText\"\n" +" # curl \"http://192.168.0.10:10041/d/table_create?name=Store&type=Hash&key_" +"type=ShortText\"\n" " [[0,1398662266.3853862,0.08530688285827637],true]" msgstr "" @@ -285,7 +285,7 @@ msgid "" msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/table_list\"\n" +" # curl \"http://192.168.0.10:10041/d/table_list\"\n" " [[0,1398662423.509928,0.003869295120239258],[[[\"id\",\"UInt32\"],[\"name\",\"Sho" "rtText\"],[\"path\",\"ShortText\"],[\"flags\",\"ShortText\"],[\"domain\",\"ShortText\"],[\"r" "ange\",\"ShortText\"],[\"default_tokenizer\",\"ShortText\"],[\"normalizer\",\"ShortText\"" @@ -297,7 +297,7 @@ msgid "Because it is a cluster, another endpoint returns same result." msgstr "" msgid "" -" # curl \"http://192.168.0.11:3000/d/table_list\"\n" +" # curl \"http://192.168.0.11:10041/d/table_list\"\n" " [[0,1398662423.509928,0.003869295120239258],[[[\"id\",\"UInt32\"],[\"name\",\"Sho" "rtText\"],[\"path\",\"ShortText\"],[\"flags\",\"ShortText\"],[\"domain\",\"ShortText\"],[\"r" "ange\",\"ShortText\"],[\"default_tokenizer\",\"ShortText\"],[\"normalizer\",\"ShortText\"" @@ -314,8 +314,8 @@ msgid "" msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/column_create?table=Store&name=location" -"&flags=COLUMN_SCALAR&type=WGS84GeoPoint\"\n" +" # curl \"http://192.168.0.10:10041/d/column_create?table=Store&name=locatio" +"n&flags=COLUMN_SCALAR&type=WGS84GeoPoint\"\n" " [[0,1398664305.8856306,0.00026226043701171875],true]" msgstr "" @@ -325,7 +325,7 @@ msgid "" msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/column_list?table=Store\"\n" +" # curl \"http://192.168.0.10:10041/d/column_list?table=Store\"\n" " [[0,1398664345.9680889,0.0011739730834960938],[[[\"id\",\"UInt32\"],[\"name\",\"S" "hortText\"],[\"path\",\"ShortText\"],[\"type\",\"ShortText\"],[\"flags\",\"ShortText\"],[\"d" "omain\",\"ShortText\"],[\"range\",\"ShortText\"],[\"source\",\"ShortText\"]],[257,\"locati" @@ -340,17 +340,18 @@ msgid "Create indexes also." msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/table_create?name=Location&type=Patrici" -"aTrie&key_type=WGS84GeoPoint\"\n" +" # curl \"http://192.168.0.10:10041/d/table_create?name=Location&type=Patric" +"iaTrie&key_type=WGS84GeoPoint\"\n" " [[0,1398664401.4927232,0.12011909484863281],true]\n" -" # curl \"http://192.168.0.10:3000/d/column_create?table=Location&name=store" -"&flags=COLUMN_INDEX&type=Store&source=location\"\n" +" # curl \"http://192.168.0.10:10041/d/column_create?table=Location&name=stor" +"e&flags=COLUMN_INDEX&type=Store&source=location\"\n" " [[0,1398664429.5348525,0.13435077667236328],true]\n" -" # curl \"http://192.168.0.10:3000/d/table_create?name=Term&type=PatriciaTri" -"e&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto\"\n" +" # curl \"http://192.168.0.10:10041/d/table_create?name=Term&type=PatriciaTr" +"ie&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto\"" +"\n" " [[0,1398664454.446939,0.14734888076782227],true]\n" -" # curl \"http://192.168.0.10:3000/d/column_create?table=Term&name=store__ke" -"y&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key\"\n" +" # curl \"http://192.168.0.10:10041/d/column_create?table=Term&name=store__k" +"ey&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key\"\n" " [[0,1398664474.7112074,0.12619781494140625],true]" msgstr "" @@ -420,8 +421,8 @@ msgid "Then, send it as a POST request of the `load` command, like:" msgstr "" msgid "" -" # curl --data \"@stores.json\" \"http://192.168.0.10:3000/d/load?table=Store\"" -"\n" +" # curl --data \"@stores.json\" \"http://192.168.0.10:10041/d/load?table=Store" +"\"\n" " [[0,1398666180.023,0.069],[40]]" msgstr "" @@ -438,8 +439,8 @@ msgid "As the starter, let's select initial ten records with the `select` comman msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/select?table=Store&output_columns=_key&" -"limit=10\"\n" +" # curl \"http://192.168.0.10:10041/d/select?table=Store&output_columns=_key" +"&limit=10\"\n" " [[0,1398666260.887927,0.000017404556274414062],[[[40],[[\"_key\",\"ShortText\"" "]],[[\"1st Avenue & 75th St. - New York NY (W)\"],[\"2nd Ave. & 9th Street - New" " York NY\"],[\"76th & Second - New York NY (W)\"],[\"15th & Third - New York NY " @@ -453,13 +454,13 @@ msgid "Of course you can specify conditions via the `query` option:" msgstr "" msgid "" -" # curl \"http://192.168.0.10:3000/d/select?table=Store&query=Columbus&match" -"_columns=_key&output_columns=_key&limit=10\"\n" +" # curl \"http://192.168.0.10:10041/d/select?table=Store&query=Columbus&matc" +"h_columns=_key&output_columns=_key&limit=10\"\n" " [[0,1398670157.661574,0.0012705326080322266],[[[2],[[\"_key\",\"ShortText\"]]," "[[\"Columbus @ 67th - New York NY (W)\"],[\"2 Columbus Ave. - New York NY (W)\"]" "]]]]\n" -" # curl \"http://192.168.0.10:3000/d/select?table=Store&filter=_key@'Ave'&ou" -"tput_columns=_key&limit=10\"\n" +" # curl \"http://192.168.0.10:10041/d/select?table=Store&filter=_key@'Ave'&o" +"utput_columns=_key&limit=10\"\n" " [[0,1398670586.193325,0.0003848075866699219],[[[3],[[\"_key\",\"ShortText\"]]," "[[\"2nd Ave. & 9th Street - New York NY\"],[\"84th & Third Ave - New York NY (W)" "\"],[\"2 Columbus Ave. - New York NY (W)\"]]]]]" Modified: ja/tutorial/groonga/index.md (+15 -15) =================================================================== --- ja/tutorial/groonga/index.md 2014-05-07 12:25:23 +0900 (b419afb) +++ ja/tutorial/groonga/index.md 2014-05-07 12:27:03 +0900 (4f51c1e) @@ -112,7 +112,7 @@ Let's continue to the next step. You can run Groonga as an HTTP server with the option `-d`, like: - # groonga -p 3000 -d --protocol http /tmp/databases/db + # groonga -p 10041 -d --protocol http /tmp/databases/db On the other hand, you have to run two servers for each Droonga node to use your Droonga cluster via HTTP. @@ -122,7 +122,7 @@ To start them, run commands like following on each Droonga node: # droonga-engine --host=192.168.0.10 \ --daemon \ --pid-file $PWD/droonga-engine.pid - # droonga-http-server --port=3000 \ + # droonga-http-server --port=10041 \ --receive-host-name=192.168.0.10 \ --droonga-engine-host-name=192.168.0.10 \ --default-dataset=Starbucks \ @@ -149,7 +149,7 @@ Now your Droonga cluster actually works as a Groonga's HTTP server. Requests are completely same to ones for a Groonga server. To create a new table `Store`, you just have to send a GET request for the `table_create` command, like: - # curl "http://192.168.0.10:3000/d/table_create?name=Store&type=Hash&key_type=ShortText" + # curl "http://192.168.0.10:10041/d/table_create?name=Store&type=Hash&key_type=ShortText" [[0,1398662266.3853862,0.08530688285827637],true] Note that you have to specify the host, one of Droonga nodes with active droonga-http-server, in your Droonga cluster. @@ -159,37 +159,37 @@ All requests will be distributed to suitable nodes in the cluster. OK, now the table has been created successfully. Let's see it by the `table_list` command: - # curl "http://192.168.0.10:3000/d/table_list" + # curl "http://192.168.0.10:10041/d/table_list" [[0,1398662423.509928,0.003869295120239258],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["default_tokenizer","ShortText"],["normalizer","ShortText"]],[256,"Store","/home/username/groonga/droonga-engine/000/db.0000100","TABLE_HASH_KEY|PERSISTENT","ShortText",null,null,null]]] Because it is a cluster, another endpoint returns same result. - # curl "http://192.168.0.11:3000/d/table_list" + # curl "http://192.168.0.11:10041/d/table_list" [[0,1398662423.509928,0.003869295120239258],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["default_tokenizer","ShortText"],["normalizer","ShortText"]],[256,"Store","/home/username/groonga/droonga-engine/000/db.0000100","TABLE_HASH_KEY|PERSISTENT","ShortText",null,null,null]]] ### Create a column Next, create a new column `location` to the `Store` table by the `column_create` command, like: - # curl "http://192.168.0.10:3000/d/column_create?table=Store&name=location&flags=COLUMN_SCALAR&type=WGS84GeoPoint" + # curl "http://192.168.0.10:10041/d/column_create?table=Store&name=location&flags=COLUMN_SCALAR&type=WGS84GeoPoint" [[0,1398664305.8856306,0.00026226043701171875],true] Then verify that the column is correctly created, by the `column_list` command: - # curl "http://192.168.0.10:3000/d/column_list?table=Store" + # curl "http://192.168.0.10:10041/d/column_list?table=Store" [[0,1398664345.9680889,0.0011739730834960938],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["type","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["source","ShortText"]],[257,"location","/home/username/groonga/droonga-engine/000/db.0000101","fix","COLUMN_SCALAR","Store","WGS84GeoPoint",[]]]] ### Create indexes Create indexes also. - # curl "http://192.168.0.10:3000/d/table_create?name=Location&type=PatriciaTrie&key_type=WGS84GeoPoint" + # curl "http://192.168.0.10:10041/d/table_create?name=Location&type=PatriciaTrie&key_type=WGS84GeoPoint" [[0,1398664401.4927232,0.12011909484863281],true] - # curl "http://192.168.0.10:3000/d/column_create?table=Location&name=store&flags=COLUMN_INDEX&type=Store&source=location" + # curl "http://192.168.0.10:10041/d/column_create?table=Location&name=store&flags=COLUMN_INDEX&type=Store&source=location" [[0,1398664429.5348525,0.13435077667236328],true] - # curl "http://192.168.0.10:3000/d/table_create?name=Term&type=PatriciaTrie&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto" + # curl "http://192.168.0.10:10041/d/table_create?name=Term&type=PatriciaTrie&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto" [[0,1398664454.446939,0.14734888076782227],true] - # curl "http://192.168.0.10:3000/d/column_create?table=Term&name=store__key&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key" + # curl "http://192.168.0.10:10041/d/column_create?table=Term&name=store__key&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key" [[0,1398664474.7112074,0.12619781494140625],true] @@ -248,7 +248,7 @@ stores.json: Then, send it as a POST request of the `load` command, like: - # curl --data "@stores.json" "http://192.168.0.10:3000/d/load?table=Store" + # curl --data "@stores.json" "http://192.168.0.10:10041/d/load?table=Store" [[0,1398666180.023,0.069],[40]] Now all data in the JSON file are successfully loaded. @@ -259,14 +259,14 @@ OK, all data is now ready. As the starter, let's select initial ten records with the `select` command: - # curl "http://192.168.0.10:3000/d/select?table=Store&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&output_columns=_key&limit=10" [[0,1398666260.887927,0.000017404556274414062],[[[40],[["_key","ShortText"]],[["1st Avenue & 75th St. - New York NY (W)"],["2nd Ave. & 9th Street - New York NY"],["76th & Second - New York NY (W)"],["15th & Third - New York NY (W)"],["41st and Broadway - New York NY (W)"],["West 43rd and Broadway - New York NY (W)"],["84th & Third Ave - New York NY (W)"],["150 E. 42nd Street - New York NY (W)"],["Macy's 35th Street Balcony - New York NY"],["Herald Square- Macy's - New York NY"]]]]] Of course you can specify conditions via the `query` option: - # curl "http://192.168.0.10:3000/d/select?table=Store&query=Columbus&match_columns=_key&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&query=Columbus&match_columns=_key&output_columns=_key&limit=10" [[0,1398670157.661574,0.0012705326080322266],[[[2],[["_key","ShortText"]],[["Columbus @ 67th - New York NY (W)"],["2 Columbus Ave. - New York NY (W)"]]]]] - # curl "http://192.168.0.10:3000/d/select?table=Store&filter=_key@'Ave'&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&filter=_key@'Ave'&output_columns=_key&limit=10" [[0,1398670586.193325,0.0003848075866699219],[[[3],[["_key","ShortText"]],[["2nd Ave. & 9th Street - New York NY"],["84th & Third Ave - New York NY (W)"],["2 Columbus Ave. - New York NY (W)"]]]]] Modified: tutorial/groonga/index.md (+15 -15) =================================================================== --- tutorial/groonga/index.md 2014-05-07 12:25:23 +0900 (7217920) +++ tutorial/groonga/index.md 2014-05-07 12:27:03 +0900 (642d322) @@ -103,7 +103,7 @@ Let's continue to the next step. You can run Groonga as an HTTP server with the option `-d`, like: - # groonga -p 3000 -d --protocol http /tmp/databases/db + # groonga -p 10041 -d --protocol http /tmp/databases/db On the other hand, you have to run two servers for each Droonga node to use your Droonga cluster via HTTP. @@ -113,7 +113,7 @@ To start them, run commands like following on each Droonga node: # droonga-engine --host=192.168.0.10 \ --daemon \ --pid-file $PWD/droonga-engine.pid - # droonga-http-server --port=3000 \ + # droonga-http-server --port=10041 \ --receive-host-name=192.168.0.10 \ --droonga-engine-host-name=192.168.0.10 \ --default-dataset=Starbucks \ @@ -140,7 +140,7 @@ Now your Droonga cluster actually works as a Groonga's HTTP server. Requests are completely same to ones for a Groonga server. To create a new table `Store`, you just have to send a GET request for the `table_create` command, like: - # curl "http://192.168.0.10:3000/d/table_create?name=Store&type=Hash&key_type=ShortText" + # curl "http://192.168.0.10:10041/d/table_create?name=Store&type=Hash&key_type=ShortText" [[0,1398662266.3853862,0.08530688285827637],true] Note that you have to specify the host, one of Droonga nodes with active droonga-http-server, in your Droonga cluster. @@ -150,37 +150,37 @@ All requests will be distributed to suitable nodes in the cluster. OK, now the table has been created successfully. Let's see it by the `table_list` command: - # curl "http://192.168.0.10:3000/d/table_list" + # curl "http://192.168.0.10:10041/d/table_list" [[0,1398662423.509928,0.003869295120239258],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["default_tokenizer","ShortText"],["normalizer","ShortText"]],[256,"Store","/home/username/groonga/droonga-engine/000/db.0000100","TABLE_HASH_KEY|PERSISTENT","ShortText",null,null,null]]] Because it is a cluster, another endpoint returns same result. - # curl "http://192.168.0.11:3000/d/table_list" + # curl "http://192.168.0.11:10041/d/table_list" [[0,1398662423.509928,0.003869295120239258],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["default_tokenizer","ShortText"],["normalizer","ShortText"]],[256,"Store","/home/username/groonga/droonga-engine/000/db.0000100","TABLE_HASH_KEY|PERSISTENT","ShortText",null,null,null]]] ### Create a column Next, create a new column `location` to the `Store` table by the `column_create` command, like: - # curl "http://192.168.0.10:3000/d/column_create?table=Store&name=location&flags=COLUMN_SCALAR&type=WGS84GeoPoint" + # curl "http://192.168.0.10:10041/d/column_create?table=Store&name=location&flags=COLUMN_SCALAR&type=WGS84GeoPoint" [[0,1398664305.8856306,0.00026226043701171875],true] Then verify that the column is correctly created, by the `column_list` command: - # curl "http://192.168.0.10:3000/d/column_list?table=Store" + # curl "http://192.168.0.10:10041/d/column_list?table=Store" [[0,1398664345.9680889,0.0011739730834960938],[[["id","UInt32"],["name","ShortText"],["path","ShortText"],["type","ShortText"],["flags","ShortText"],["domain","ShortText"],["range","ShortText"],["source","ShortText"]],[257,"location","/home/username/groonga/droonga-engine/000/db.0000101","fix","COLUMN_SCALAR","Store","WGS84GeoPoint",[]]]] ### Create indexes Create indexes also. - # curl "http://192.168.0.10:3000/d/table_create?name=Location&type=PatriciaTrie&key_type=WGS84GeoPoint" + # curl "http://192.168.0.10:10041/d/table_create?name=Location&type=PatriciaTrie&key_type=WGS84GeoPoint" [[0,1398664401.4927232,0.12011909484863281],true] - # curl "http://192.168.0.10:3000/d/column_create?table=Location&name=store&flags=COLUMN_INDEX&type=Store&source=location" + # curl "http://192.168.0.10:10041/d/column_create?table=Location&name=store&flags=COLUMN_INDEX&type=Store&source=location" [[0,1398664429.5348525,0.13435077667236328],true] - # curl "http://192.168.0.10:3000/d/table_create?name=Term&type=PatriciaTrie&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto" + # curl "http://192.168.0.10:10041/d/table_create?name=Term&type=PatriciaTrie&key_type=ShortText&default_tokenizer=TokenBigram&normalizer=NormalizerAuto" [[0,1398664454.446939,0.14734888076782227],true] - # curl "http://192.168.0.10:3000/d/column_create?table=Term&name=store__key&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key" + # curl "http://192.168.0.10:10041/d/column_create?table=Term&name=store__key&flags=COLUMN_INDEX|WITH_POSITION&type=Store&source=_key" [[0,1398664474.7112074,0.12619781494140625],true] @@ -239,7 +239,7 @@ stores.json: Then, send it as a POST request of the `load` command, like: - # curl --data "@stores.json" "http://192.168.0.10:3000/d/load?table=Store" + # curl --data "@stores.json" "http://192.168.0.10:10041/d/load?table=Store" [[0,1398666180.023,0.069],[40]] Now all data in the JSON file are successfully loaded. @@ -250,14 +250,14 @@ OK, all data is now ready. As the starter, let's select initial ten records with the `select` command: - # curl "http://192.168.0.10:3000/d/select?table=Store&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&output_columns=_key&limit=10" [[0,1398666260.887927,0.000017404556274414062],[[[40],[["_key","ShortText"]],[["1st Avenue & 75th St. - New York NY (W)"],["2nd Ave. & 9th Street - New York NY"],["76th & Second - New York NY (W)"],["15th & Third - New York NY (W)"],["41st and Broadway - New York NY (W)"],["West 43rd and Broadway - New York NY (W)"],["84th & Third Ave - New York NY (W)"],["150 E. 42nd Street - New York NY (W)"],["Macy's 35th Street Balcony - New York NY"],["Herald Square- Macy's - New York NY"]]]]] Of course you can specify conditions via the `query` option: - # curl "http://192.168.0.10:3000/d/select?table=Store&query=Columbus&match_columns=_key&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&query=Columbus&match_columns=_key&output_columns=_key&limit=10" [[0,1398670157.661574,0.0012705326080322266],[[[2],[["_key","ShortText"]],[["Columbus @ 67th - New York NY (W)"],["2 Columbus Ave. - New York NY (W)"]]]]] - # curl "http://192.168.0.10:3000/d/select?table=Store&filter=_key@'Ave'&output_columns=_key&limit=10" + # curl "http://192.168.0.10:10041/d/select?table=Store&filter=_key@'Ave'&output_columns=_key&limit=10" [[0,1398670586.193325,0.0003848075866699219],[[[3],[["_key","ShortText"]],[["2nd Ave. & 9th Street - New York NY"],["84th & Third Ave - New York NY (W)"],["2 Columbus Ave. - New York NY (W)"]]]]] -------------- next part -------------- HTML����������������������������... Descargar