This is a document for PGroonga 2.0.0 or later. See PGroonga 1.X document when you're using PGroonga 1.X.
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 schema is deprecated since 2.0.0. Use pgroonga_* functions, operators and operator classes in the current schema for newly written code.
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
Operators
Row level security support
Since 2.3.3.
All v2 operators supports PostgreSQL's row level security.
For text
pgroonga_text_full_text_search_ops_v2 operator class (default)
-
ILIKEoperator -
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@*operator: Similar search -
&~?operator: Similar search- Deprecated since 1.2.2. Use
&@*operator instead.
- Deprecated since 1.2.2. Use
-
&`operator: Advanced search by ECMAScript like query language -
&@|operator: Full text search by an array of keywords -
&@>operator: Full text search by an array of keywords- Deprecated since 1.2.1. Use
&@|operator instead.
- Deprecated since 1.2.1. Use
-
&@~|operator: Full text search by an array of queries in easy to use query language -
&?|operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.2. Use
&@~|operator instead.
- Deprecated since 1.2.2. Use
-
&?>operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.1. Use
&@~|operator instead.
- Deprecated since 1.2.1. Use
pgroonga_text_term_search_ops_v2 operator class
-
<- Since 1.2.2.
-
<=- Since 1.2.2.
-
=- Since 1.2.2.
-
>=- Since 1.2.2.
-
>- Since 1.2.2.
-
&=operator: Exact match search- Since 2.4.6.
-
&^operator: Prefix search -
&^~operator: Prefix RK search -
&^|operator: Prefix search by an array of prefixes -
&^>operator: Prefix search by an array of prefixes- Deprecated since 1.2.1. Use
&^|operator instead.
- Deprecated since 1.2.1. Use
-
!&^|operator: NOT prefix search by an array of prefixes- Since 2.2.1.
-
&^~|operator: Prefix RK search by an array of prefixes -
&^~>operator: Prefix RK search by an array of prefixes- Deprecated since 1.2.1. Use
&^~|operator instead.
- Deprecated since 1.2.1. Use
pgroonga_text_regexp_ops_v2 operator class
-
ILIKEoperator -
&~operator: Search by a regular expression -
@~operator: Search by a regular expression- Don't use this operator for newly written code. It's just for backward compatibility.
-
&~|operator: Search by an array of regular expressions- Since 2.2.1.
pgroonga_text_semantic_search_ops_v2 operator class
Since 4.0.5.
-
&@*operator: Semantic search- Since 4.0.5.
-
<&@*>operator: Calculates the semantic distance- Since 4.0.5.
For text[]
pgroonga_text_array_full_text_search_ops_v2 operator class (default)
-
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@*operator: Similar search -
&~?operator: Similar search- Deprecated since 1.2.2. Use
&@*operator instead.
- Deprecated since 1.2.2. Use
-
&`operator: Advanced search by ECMAScript like query language -
&@|operator: Full text search by an array of keywords -
&@>operator: Full text search by an array of keywords- Deprecated since 1.2.1. Use
&@|operator instead.
- Deprecated since 1.2.1. Use
-
&@~|operator: Full text search by an array of queries in easy to use query language -
&?|operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.2. Use
&@~|operator instead.
- Deprecated since 1.2.2. Use
-
&?>operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.1. Use
&@~|operator instead.
- Deprecated since 1.2.1. Use
pgroonga_text_array_term_search_ops_v2 operator class
-
&^operator: Prefix search -
&^>operator: Prefix search- Deprecated since 1.2.1. Use
&^operator instead.
- Deprecated since 1.2.1. Use
-
&^~operator: Prefix RK search -
&^~>operator: Prefix RK search- Deprecated since 1.2.1. Use
&^~operator instead.
- Deprecated since 1.2.1. Use
-
&^|operator: Prefix search by an array of prefixes -
&^~|operator: Prefix RK search by an array of prefixes -
@>operator: Contained search by an array- Since 2.2.1.
-
&=~operator: Equal search by easy to use query language- Since 3.0.0.
pgroonga_text_array_regexp_ops_v2 operator class
Since 3.2.5.
&~operator: Search by a regular expression
For varchar
pgroonga_varchar_term_search_ops_v2 operator class (default)
-
< -
<= -
= -
>= -
> -
&=operator: Exact match search- Since 2.4.6.
-
&^operator: Prefix search -
&^~operator: Prefix RK search -
&^|operator: Prefix search by an array of prefixes -
&^~|operator: Prefix RK search by an array of prefixes
pgroonga_varchar_full_text_search_ops_v2 operator class
-
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Don't use this operator for newly written code. It's just for backward compatibility.
-
&@*operator: Similar search -
&~?operator: Similar search- Deprecated since 1.2.2. Use
&@*operator instead.
- Deprecated since 1.2.2. Use
-
&`operator: Advanced search by ECMAScript like query language -
&@|operator: Full text search by an array of keywords -
&@>operator: Full text search by an array of keywords- Deprecated since 1.2.1. Use
&@|operator instead.
- Deprecated since 1.2.1. Use
-
&@~|operator: Full text search by an array of queries in easy to use query language -
&?|operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.2. Use
&@~|operator instead.
- Deprecated since 1.2.2. Use
-
&?>operator: Full text search by an array of queries in easy to use query language- Deprecated since 1.2.1. Use
&@~|operator instead.
- Deprecated since 1.2.1. Use
pgroonga_varchar_regexp_ops_v2 operator class
-
&~operator: Search by a regular expression -
@~operator: Search by a regular expression- Don't use this operator for newly written code. It's just for backward compatibility.
-
&~|operator: Search by an array of regular expressions- Since 2.2.1.
For varchar[]
pgroonga_varchar_array_term_search_ops_v2 operator class (default)
-
&>operator: Check whether a term is included in an array of terms -
%%operator: Check whether a term is included in an array of terms- Don't use this operator for newly written code. It's just for backward compatibility.
-
@>operator: Contained search by an array- Since 2.2.1.
-
&=~operator: Equal search by easy to use query language- Since 3.0.0.
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_v2 operator class (default)
-
&@operator: Full text search against all text data injsonbby a keyword -
&@~operator: Full text search against all text data injsonbby easy to use query language -
&?operator: Full text search against all text data injsonbby easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
&`operator: Advanced search by ECMAScript like query language -
@@operator: Advanced search by ECMAScript like query language- Don't use this operator for newly written code. It's just for backward compatibility.
-
@>operator: Search by ajsonbdata
pgroonga_jsonb_full_text_search_ops_v2 operator class
-
&@operator: Full text search against all text data injsonbby a keyword -
&@~operator: Full text search against all text data injsonbby easy to use query language
Old operators
For text
pgroonga_text_full_text_search_ops operator class (default)
Deprecated since 2.0.0.
Use pgroonga_text_full_text_search_ops_v2 operator class instead.
-
ILIKEoperator -
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Deprecated since 1.2.0. Use
&@operator instead.
- Deprecated since 1.2.0. Use
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Deprecated since 1.2.0. Use
&@~operator instead.
- Deprecated since 1.2.0. Use
pgroonga_text_regexp_ops operator class
Deprecated since 2.0.0.
Use pgroonga_text_regexp_ops_v2 operator class instead.
-
ILIKEoperator -
&~operator: Search by a regular expression -
@~operator: Search by a regular expression- Deprecated since 1.2.1. Use
&~operator instead.
- Deprecated since 1.2.1. Use
For text[]
pgroonga_text_array_full_text_search_ops operator class
Deprecated since 2.0.0.
Use pgroonga_text_array_full_text_search_ops_v2 operator class instead.
-
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Deprecated since 1.2.0. Use
&@operator instead.
- Deprecated since 1.2.0. Use
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Deprecated since 1.2.0. Use
&@~operator instead.
- Deprecated since 1.2.0. Use
For varchar
pgroonga_varchar_ops operator class
Deprecated since 2.0.0.
Use pgroonga_varchar_term_search_ops_v2 operator class instead.
-
< -
<= -
= -
>= -
>
pgroonga_varchar_full_text_search_ops operator class
Deprecated since 2.0.0.
Use pgroonga_varchar_full_text_search_ops_v2 operator class instead.
-
&@operator: Full text search by a keyword -
%%operator: Full text search by a keyword- Deprecated since 1.2.0. Use
&@operator instead.
- Deprecated since 1.2.0. Use
-
&@~operator: Full text search by easy to use query language -
&?operator: Full text search by easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
@@operator: Full text search by easy to use query language- Deprecated since 1.2.0. Use
&@~operator instead.
- Deprecated since 1.2.0. Use
pgroonga_varchar_regexp_ops operator class
Deprecated since 2.0.0.
Use pgroonga_varchar_regexp_ops_v2 operator class instead.
-
&~operator: Search by a regular expression -
@~operator: Search by a regular expression- Deprecated since 1.2.1. Use
&~operator instead.
- Deprecated since 1.2.1. Use
For varchar[]
pgroonga_varchar_array_ops operator class
Deprecated since 2.0.0.
Use pgroonga_varchar_array_term_search_ops_v2 operator class instead.
-
&>operator: Check whether a term is included in an array of terms -
%%operator: Check whether a term is included in an array of terms- Deprecated since 1.2.1. Use
&>operator instead.
- Deprecated since 1.2.1. Use
For jsonb
pgroonga_jsonb_ops operator class
Deprecated since 2.0.0.
Use pgroonga_jsonb_ops_v2 operator class instead.
-
&@operator: Full text search against all text data injsonbby a keyword -
&@~operator: Full text search against all text data injsonbby easy to use query language -
&?operator: Full text search against all text data injsonbby easy to use query language- Deprecated since 1.2.2. Use
&@~operator instead.
- Deprecated since 1.2.2. Use
-
&`operator: Advanced search by ECMAScript like query language -
@@operator: Advanced search by ECMAScript like query language- Deprecated since 1.2.1. Use
&`operator instead.
- Deprecated since 1.2.1. Use
-
@>operator: Search by ajsonbdata
Functions
-
pgroonga_language_model_vectorizefunction- Since 4.0.5.
Parameters
-
pgroonga.enable_row_level_securityparameter- Since 3.1.6.
-
pgroonga.enable_trace_logparameter- Since 3.0.8.
-
pgroonga.enable_wal_resource_managerparameter- Since 3.2.1.
-
pgroonga.log_rotate_threshold_sizeparameter- Since 3.2.3.
-
pgroonga.max_bulk_insert_wal_record_sizeparameter- Since 3.2.5.
-
pgroonga.max_wal_sizeparameter- Since 2.3.3.
-
pgroonga.query_log_rotate_threshold_sizeparameter- Since 3.2.3.
-
pgroonga_crash_safer.flush_naptimeparameter- Since 2.3.3.
-
pgroonga_crash_safer.log_levelparameter- Since 2.3.3.
-
pgroonga_crash_safer.log_pathparameter- Since 2.3.3.
-
pgroonga_crash_safer.max_recovery_threadsparameter- Since 3.1.9.
-
pgroonga_standby_maintainer.max_parallel_wal_appliers_per_dbparameter- Since 3.1.2.
-
pgroonga_standby_maintainer.naptimeparameter- Since 2.4.2.
-
pgroonga_wal_resource_manager.log_levelparameter- Since 3.2.1.
-
pgroonga_wal_resource_manager.log_pathparameter- Since 3.2.1.
Modules
-
- Deprecated since 2.3.3. Use
pgroonga_crash_safermodule instead.
- Deprecated since 2.3.3. Use
-
- Since 2.3.3.
-
- Deprecated since 2.3.3. Use
pgroonga_crash_safermodule instead.
- Deprecated since 2.3.3. Use
-
-
Since 2.3.3.
-
pgroonga_wal_appliermodule is deprecated since 2.4.2. We use thepgroonga_standby_maintainermodule instead.
-
-
pgroonga_standby_maintainermodule- Since 2.4.2.
-
pgroonga_wal_resource_managermodule- Since 3.2.1.
Executables
-
pgroonga-primary-maintainer.shcommand- Since 3.2.1.
-
pgroonga-generate-primary-maintainer-service.shcommand- Since 3.2.1.
-
pgroonga-generate-primary-maintainer-timer.shcommand- Since 3.2.1.
Groonga functions
You can use them with pgroonga_command function. You can't use them in WHERE clause.
Tuning
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:
