[Groonga-commit] groonga/groonga.org at 9b60a16 [gh-pages] blog en: add PGroonga 1.0.6 release announce

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 18 14:14:41 JST 2016


Kouhei Sutou	2016-04-18 14:14:41 +0900 (Mon, 18 Apr 2016)

  New Revision: 9b60a16f824c4552575ae30c9924aff5da6c5093
  https://github.com/groonga/groonga.org/commit/9b60a16f824c4552575ae30c9924aff5da6c5093

  Message:
    blog en: add PGroonga 1.0.6 release announce

  Added files:
    en/_posts/2016-04-15-pgroonga-1.0.6.md

  Added: en/_posts/2016-04-15-pgroonga-1.0.6.md (+162 -0) 100644
===================================================================
--- /dev/null
+++ en/_posts/2016-04-15-pgroonga-1.0.6.md    2016-04-18 14:14:41 +0900 (5b456c6)
@@ -0,0 +1,162 @@
+---
+layout: post.en
+title: PGroonga 1.0.6 has been released
+description: PGroonga 1.0.6 has been released!
+---
+
+## PGroonga 1.0.6 has been released
+
+[PGroonga](http://pgroonga.github.io/) (píːzí:lúnɡά) 1.0.6 has been released!
+
+See [PGroonga 1.0.0 release announce]({% post_url 2015-10-29-pgroonga-1.0.0 %}) about PGroonga.
+
+## Changes
+
+Here are changes since 1.0.3:
+
+  * [[Windows](https://pgroonga.github.io/install/windows.html)] Added version information to DLL.
+  * [`pgroonga.text_full_text_search_ops_v2` operator class] Added `&~?` operator that does similar search.
+  * [`pgroonga.text_term_search_ops_v2` operator class] Added `&^` operator that does prefix search.
+  * [`pgroonga.text_term_search_ops_v2` operator class] Added `&^~` operator that does [prefix RK search](http://groonga.org/docs/reference/operations/prefix_rk_search.html).
+  * [Windows] Upgraded base PostgreSQL to 9.5.2.
+  * [Windows] Upgraded bundled Groonga to 6.0.1.
+  * [Windows] Changed Visual Studio version for building PGroonga to 2013. Because PostgreSQL binary is built by 2013.
+
+### Prefix search and prefix RK search
+
+This release adds `pgroonga.text_term_search_ops_v2` operator class. You can use prefix search and prefix RK search with this operator class. They are useful to implement input completion on search text box.
+
+The following description shows how to use prefix search and prefix RK search. The following description uses an example that implements tag name input completion.
+
+First, you need to insert tag names and tag readings. Tag readings should be in KATAKANA.
+
+```sql
+CREATE TABLE tags (
+  name text PRIMARY KEY
+);
+
+CREATE TABLE tag_readings (
+  tag_name text
+    REFERENCES tags ON DELETE CASCADE ON UPDATE CASCADE,
+  katakana text,
+  PRIMARY KEY (tag_name, katakana)
+);
+
+INSERT INTO tags VALUES ('PostgreSQL');
+INSERT INTO tags VALUES ('Groonga');
+INSERT INTO tags VALUES ('PGroonga');
+INSERT INTO tags VALUES ('pglogical');
+
+INSERT INTO tag_readings VALUES ('PostgreSQL', 'ポストグレスキューエル');
+INSERT INTO tag_readings VALUES ('PostgreSQL', 'ポスグレ');
+INSERT INTO tag_readings VALUES ('Groonga', 'グルンガ');
+INSERT INTO tag_readings VALUES ('PGroonga', 'ピージールンガ');
+INSERT INTO tag_readings VALUES ('pglogical', 'ピージーロジカル');
+```
+
+You need to create indexes against tag names and tag readings. It's important that `pgroonga.text_term_search_ops_v2` operator class is used for `tags.name` and `tar_readings.katakana`.
+
+```sql
+CREATE INDEX pgrn_tags_index ON tags
+  USING pgroonga (name pgroonga.text_term_search_ops_v2);
+CREATE INDEX pgrn_tag_readings_index ON tag_readings
+  USING pgroonga (katakana pgroonga.text_term_search_ops_v2);
+```
+
+Here is a `SELECT` to use prefix search against tag names such as `PostgreSQL` and `Groonga`:
+
+```sql
+SELECT name
+  FROM tags
+  WHERE name &^ 'pos';
+--     name    
+-- ------------
+--  PostgreSQL
+-- (1 row)
+```
+
+Here is a `SELECT` to search tags by [Romanization of Japanese](https://en.wikipedia.org/wiki/Romanization_of_Japanese):
+
+```sql
+SELECT tag_name, katakana
+  FROM tag_readings
+  WHERE katakana &^~ 'pos';
+--   tag_name  |        katakana        
+-- ------------+------------------------
+--  PostgreSQL | ポスグレ
+--  PostgreSQL | ポストグレスキューエル
+-- (2 rows)
+```
+
+You can use `UNION` to get both results:
+
+```sql
+SELECT name
+  FROM tags
+  WHERE name &^ 'pos'
+UNION
+SELECT tag_name
+  FROM tag_readings
+  WHERE katakana &^~ 'pos';
+--     name    
+-- ------------
+--  PostgreSQL
+-- (1 row)
+```
+
+Here is an example that searches by `pi-ji-`:
+
+```sql
+SELECT name
+  FROM tags
+  WHERE name &^ 'pi-ji-'
+UNION
+SELECT tag_name
+  FROM tag_readings
+  WHERE katakana &^~ 'pi-ji-';
+--    name    
+-- -----------
+--  PGroonga
+--  pglogical
+-- (2 rows)
+```
+
+If you can implement input completion by PostgreSQL, you can use PostgreSQL on more situations.
+
+In the next release, you will be able to use the following SQL to implement the same features:
+
+```sql
+CREATE TABLE tags (
+  name text PRIMARY KEY,
+  readings text[]
+);
+
+CREATE INDEX pgrn_tags_index ON tags
+  USING pgroonga (name     pgroonga.text_term_search_ops_v2,
+                  readings pgroonga.text_array_term_search_ops_v2);
+
+INSERT INTO tags VALUES ('PostgreSQL', ARRAY['ポストグレスキューエル', 'ポスグレ']);
+INSERT INTO tags VALUES ('Groonga',    ARRAY['グルンガ']);
+INSERT INTO tags VALUES ('PGroonga',   ARRAY['ピージールンガ']);
+INSERT INTO tags VALUES ('pglogical',  ARRAY['ピージーロジカル']);
+
+SELECT name
+  FROM tags
+  WHERE name &^ 'pi-ji-' OR
+        readings &^~ 'pi-ji-';
+--    name    
+-- -----------
+--  PGroonga
+--  pglogical
+-- (2 rows)
+```
+
+## How to upgrade
+
+This version is compatible with 1.0.3, 1.0.4 and 1.0.5. Upgrade by steps in ["Compatible case" in Upgrade document](http://pgroonga.github.io/upgrade/#compatible-case).
+
+## Conclusion
+
+New PGroonga version has been released.
+
+Try PGroonga when you want to perform fast full text search against all languages on PostgreSQL!
-------------- next part --------------
HTML����������������������������...
다운로드 



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