This is a document for PGroonga 1.X. See PGroonga 2.x document when you're using recent PGroonga.

Reference manual

This document describes about all features. Tutorial focuses on easy to understand only about important features. This document focuses on completeness. If you don't read tutorial yet, read tutorial before read this document.

pgroonga schema

PGroonga defines functions, operators, operator classes and so on into pgroonga schema. Only superuser can use features in pgroonga schema by default. Superuser needs to grant USAGE privilege on pgroonga schema to normal users who want to use PGroonga.

pgroonga index


For text

pgroonga.text_full_text_search_ops operator class (default)

pgroonga.text_regexp_ops operator class

For text[]

For varchar

pgroonga.varchar_ops operator class (default)

pgroonga.varchar_full_text_search_ops operator class

pgroonga.varchar_regexp_ops operator class

For varchar[]

pgroonga.varchar_array_ops operator class (default)

For boolean, numbers and timestamps

Supported types: boolean, smallint, integer, bigint, real, double precision, timestamp and timestamp with time zone

For jsonb

pgroonga.jsonb_ops operator class (default)

Operators v2

PGroonga 1.Y.Z provides pgroonga.XXX_v2 operator classes. They don't provide backward compatibility until PGroonga 2.0.0. But they include many improvements aggressively when new versions are released.

If you use them, you need to use incompatible case steps to upgrade PGroonga.

For text

pgroonga.text_full_text_search_ops_v2 operator class

pgroonga.text_term_search_ops_v2 operator class

pgroonga.text_regexp_ops_v2 operator class

For text[]

pgroonga.text_array_full_text_search_ops_v2 operator class

pgroonga.text_array_term_search_ops_v2 operator class

For varchar

pgroonga.varchar_full_text_search_ops_v2 operator class

pgroonga.varchar_regexp_ops_v2 operator class

For varchar[]

pgroonga.varchar_array_term_search_ops_v2 operator class

For jsonb

pgroonga.jsonb_ops_v2 operator class




Groonga functions

You can use them with pgroonga.command function. You can't use them in WHERE clause.


Normally, you don't need to tune PGroonga because PGroonga works well by default.

But you need to tune PGroonga in some cases such as a case that you need to handle a very large database. PGroonga uses Groonga as backend. It means that you can apply tuning knowledge for Groonga to PGroonga. See the following Groonga document to tune PGroonga: