BloGroonga

2017-07-03

PGroonga (fast full text search module for PostgreSQL) 1.2.3 has been released

PGroonga (píːzí:lúnɡά) (fast full text search module for PostgreSQL) 1.2.3 has been released!

See PGroonga 1.0.0 release announce about PGroonga.

Highlight

Here are highlights from 1.2.1:

  • Cleared operator names

  • Supported query expansion

  • Supported auto complete

  • Supported similar search

  • Improved usage of full text search against jsonb

Cleared operator names

PGroonga has used @@ as operator name for full text search with query language. It's the operator name used by textsearch. It's for easy to use for existing PostgreSQL users. But it's not easy to use because there are differences between textserach's @@ and PGroonga's @@.

PGroonga introduced &? as alternative of @@ and deprecated @@. It works well when we run SQL directly on psql, but doesn't work well with client libraries. Because ? is used as placeholder character in client libraries.

Finally, PGroonga introduces &@~ and deprecates @@ and &?.

Existing operator classes that doesn't have _v2 suffix can use &@~. So users can migrate new operator gradually.

Supported query expansion

Query expansion is used for implementing synonym search. (*)

(*) Synonym search is a search to find by meaning rather than surface. For example, you can find "PostgreSQL" with "PostgreSQL", "Postgres" or "PG".

Query expansion rules (synonyms) are managed in normal table. So you can use normal SELECT, INSERT, UPDATE and DELETE to manage them. Textsearch uses synonym dictionary to manage synonyms. So you need to use special way to manage synonyms.

See pgroonga.query_expand function for details.

Supported auto complete

Simple full text search only full text search system is too naive as the recent full text search system. The recent full text search systems have auto complete feature as one of standard features. In this release, PGroonga supports auto complete feature.

Auto complete is implemented by prefix search and full text search. PGroonga also provides Japanese specialized auto complete feature. PGroonga supports auto complete by Romaji.

Complete candidates are managed in normal table. It's easy to maintain.

See how to implement auto complete for details.

Similar search is useful search for providing related documents to users. _v2 operator classes support similar search.

See &~? operator for how to use similar search. TokenMecab tokenizer is recommended for similar search against Japanese documents. It's described at the end of the document. If your documents are written in Japanese, see the document carefully.

Improved usage of full text search against jsonb

You can search all texts in jsonb with old PGroonga but the new PGroonga improves usability. You can do full text search from all texts in jsonb like you do from a text column:

-- For text column
SELECT * FROM memos WHERE content &@~ 'KEYWORD1 OR KEYWORD2';
-- For jsonb column
SELECT * FROM logs WHERE record &@~ 'KEYWORD1 OR KEYWORD2';

See &@~ operator for jsonb for details.

How to upgrade

This version is compatible with 1.0 or later. You can upgrade by steps in "Compatible case" in Upgrade document.

Conclusion

New PGroonga version has been released.

See also release note for all changes.

Try PGroonga when you want to perform fast full text search against all languages on PostgreSQL!