[Groonga-commit] groonga/groonga.github.com [master] doc en: add 2.0.7 release entry

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Sep 28 14:55:55 JST 2012


HAYASHI Kentaro	2012-09-28 14:55:55 +0900 (Fri, 28 Sep 2012)

  New Revision: 9aec0c102779c9f15dffe9f9387b41216d9b9105
  https://github.com/groonga/groonga.github.com/commit/9aec0c102779c9f15dffe9f9387b41216d9b9105

  Log:
    doc en: add 2.0.7 release entry

  Added files:
    en/_posts/2012-09-29-release.textile

  Added: en/_posts/2012-09-29-release.textile (+182 -0) 100644
===================================================================
--- /dev/null
+++ en/_posts/2012-09-29-release.textile    2012-09-28 14:55:55 +0900 (2ae8c3d)
@@ -0,0 +1,182 @@
+---
+layout: post.en
+title: Groonga 2.0.7 has been released
+description: Groonga 2.0.7 has been released!
+published: true
+---
+
+h2. Groonga 2.0.7 has been released
+
+"Groonga 2.0.7":/docs/news.html#release-2-0-7 has been released!
+
+How to install: "Install":/docs/install.html
+
+There are three topics for this release.
+
+* Supported to @load@ command by POST
+* Changed package name and port number for server use
+* Supported @min@ and @max@ function
+
+h3. Supported to @load@ command by POST
+
+This release began to support groonga-httpd load command by POST.
+
+Here is the more concrete example.
+
+Schema definition:
+
+<pre>
+  table_create --name Site --flags TABLE_HASH_KEY --key_type ShortText
+  column_create --table Site --name title --type ShortText
+</pre>
+
+You can use browser based admin tool by accessing http://localhost:10041/. Create Site table and title column.
+
+After creating Site table and title column, then prepare the POST data as JSON format.
+
+Sample POST data:
+
+<pre>
+  [
+  {"_key": "site1", "title":"Web site1 title"}
+  ]
+</pre>
+
+Execute curl command to post sample data.
+
+<pre>
+  % curl -X POST 'http://localhost:10041/d/load?table=Site' \
+    --verbose -H 'Content-Type: application/json' -d****@postb*****
+</pre>
+
+You can get following results:
+
+<pre>
+  * About to connect() to localhost port 10041 (#0)
+  *   Trying 127.0.0.1... connected
+  > POST /d/load?table=Site HTTP/1.1
+  > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
+  > Host: localhost:10041
+  > Accept: */*
+  > Content-Type: application/json
+  > Content-Length: 50
+  > 
+  * upload completely sent off: 50out of 50 bytes
+  < HTTP/1.1 200 OK
+  < Server: nginx/1.2.1
+  < Date: Tue, 25 Sep 2012 05:38:24 GMT
+  < Content-Type: application/json
+  < Content-Length: 45
+  < Connection: keep-alive
+  < 
+  * Connection #0 to host localhost left intact
+  * Closing connection #0
+  [[0,1348551504.38352,0.000763893127441406],1]%
+</pre>
+
+Now, you have loaded sample data by POST.
+
+h3. Changed package name and port number for server use
+
+This release began to reconfigure packages for server use.
+
+The groonga project had been provided following packages for server use.
+
+* groonga-server (HTTP server package)
+* groonga-httpd (HTTP server package)
+
+It is inconvenient for GQTP server use. And there is a problem that port number is conflicted (10041).
+
+Then, we have split groonga-server package into independed one which provides HTTP or GQTP protocol server functionality and reassigned port number for server use.
+
+* groonga-server-http (HTTP server 10041 port)
+* groonga-server-gqtp (GQTP server 10043 port)
+
+<pre>
+Note: groonga-server-http package and groonga-httpd package are exclusive one.
+</pre>
+
+h3. Supported @min@ and @max@ function
+
+This release began to support min and max function.
+
+* The min function returns the minimum value within given arguments.
+* The man function returns the maximum value within given arguments.
+
+These function enable you to customize full-text search results when the value of score about search results is unevenly distributed.
+
+Schema definition:
+
+<pre>
+  table_create --name Site --flags TABLE_HASH_KEY --key_type ShortText
+  column_create --table Site --name title --type ShortText
+  column_create --table Site --name point --type Int8
+
+  table_create --name Terms --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
+  column_create --table Terms --name blog_title --flags COLUMN_INDEX|WITH_POSITION --type Site --source title
+</pre>
+
+Sample data:
+
+<pre>
+  load --table Site
+  [
+  {"_key":"http://example.org/","title":"This is test record 1!","point":1},
+  {"_key":"http://example.net/","title":"test record 2.","point":2},
+  {"_key":"http://example.com/","title":"test test record three.","point":3},
+  {"_key":"http://example.net/afr","title":"test record four.", "point":4},
+  {"_key":"http://example.org/aba","title":"test test test record five.","point":5},
+  {"_key":"http://example.com/rab","title":"test test test test record six.","point":0},
+  {"_key":"http://example.net/atv","title":"test test test record seven.","point":7},
+  {"_key":"http://example.org/gat","title":"test test record eight.","point":8},
+  {"_key":"http://example.com/vdw","title":"test test record nine.","point":9},
+  ]
+</pre>
+
+For example, There is a situation that you want to execute full-text search by specified word (test) stored at title column. (There are some data that the value of importance is already stored at point column.)
+
+If you want to get matched and sorted results with specified word (test), here is the query.
+
+<pre>
+  > select --table Site --query title:@test --output_columns _id,_score,title,point  --sortby -_score,-point
+
+  ["_id","UInt32"],["_score","Int32"],["title","ShortText"],["point","Int8"]
+  [6,4,"test test test test record six.",0],
+  [7,3,"test test test record seven.",7],
+  [5,3,"test test test record five.",5],
+  [9,2,"test test record nine.",9],
+  [8,2,"test test record eight.",8],
+  [3,2,"test test record three.",3],
+  [4,1,"test record four.",4],
+  [2,1,"test record 2.",2],
+  [1,1,"This is test record 1!",1]
+</pre>
+
+But, it returns "test test test test record fix." as best matched result.
+
+The min function satisfy the demand that you want to customize the matched results by eliminating unwanted ones.
+
+There is the way to customize the value of _score column by using min function.
+
+<pre>
+  > select --table Site --query title:@test --output_columns _id,_score,title,point \
+      --scorer '_score = min(_score, 3) --sortby -_score,-point
+
+  ["_id","UInt32"],["_score","Int32"],["title","ShortText"],["point","Int8"]
+  [7,3,"test test test record seven.",7],
+  [5,3,"test test test record five.",5],
+  [6,3,"test test test test record six.",0],
+  [9,2,"test test record nine.",9],
+  [8,2,"test test record eight.",8],
+  [3,2,"test test record three.",3],
+  [4,1,"test record four.",4],
+  [2,1,"test record 2.",2],[1,1,"This is test record 1!",1]
+</pre>
+
+Now, you can get the intended results which consider matched results and the value of importance.
+
+h3. Conclusion
+
+See "Release 2.0.7 2012/09/29":/docs/news.html#release-2-0-7 about detailed changes since 2.0.6.
+
+Let's search by groonga!
-------------- next part --------------
HTML����������������������������...
Download 



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