PGroonga 3.0.0 - Multilingual fast full text search

Posted on 2023-04-15 by PGroonga project
Related Open Source

Hi,

PGroonga 3.0.0 has been released!

NOTE: If you're a PGroonga 1.Y.Z user, PGroonga 3.0.0 has an incompatible change! If you're a PGroonga 2.Y.Z user, PGroonga 3.0.0 does NOT have an incompatible change. :-)

See also release announce blog post: https://groonga.org/en/blog/2023/04/13/pgroonga-3.0.0.html

About PGroonga

PGroonga is a PostgreSQL extension that makes PostgreSQL fast full text search platform for all languages! It's released under PostgreSQL license.

There are some PostgreSQL extensions that improves full text search feature of PostgreSQL such as pg_trgm^1.

pg_trgm doesn't support languages that use non-alphanumerics characters such as Japanese and Chinese.

PGroonga supports all languages, provides rich full text search related features and is very fast. Because PGroonga uses Groonga^2 that is a full-fledged full text search engine as backend.

See the following benchmark results for performance:

  • Benchmark result for PGroonga, textsearch and pg_trgm with English Wikipedia https://pgroonga.github.io/reference/pgroonga-versus-textsearch-and-pg-trgm.html
  • Benchmark result for PGroonga and pg_bigm with Japanese Wikipedia https://pgroonga.github.io/reference/pgroonga-versus-pg-bigm.html

PGroonga also supports JSON search. You can use each value for condition. You can also perform full text search against all texts in JSON like textsearch in PostgreSQL.

Changes

Here are changes in PGroonga 3.0.0:

  • Stopped defining PGroonga 1.Y.Z compatible operators to the public schema.
  • Added support for query_allow_column=true index option in pgroonga_query_extract_keywords() function.
  • Added support for query syntax for text[] and varchar[].

Usage

You can use PGroonga without full text search knowledge. You just create an index and puts a condition into WHERE:

CREATE INDEX index_name ON table USING pgroonga (column);
SELECT * FROM table WHERE column &@~ 'PostgreSQL';

You can also use LIKE to use PGroonga. PGroonga provides a feature that performs LIKE with index. LIKE with PGroonga index is faster than LIKE without index. It means that you can improve performance without changing your application that uses the following SQL:

SELECT * FROM table WHERE column LIKE '%PostgreSQL%';

Are you interested in PGroonga? Please install^4 and try tutorial^5. You can know all PGroonga features.

You can install PGroonga easily. Because PGroonga provides packages for major platforms. There are binaries for Windows.

Thanks,