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

jsonb support

PGroonga also supports jsonb type. You can search JSON data by one or more keys and/or one or more values with PGroonga.

You can also search JSON data by full text search against all text values in JSON. It's an unique feature of PGroonga. Built-in PostgreSQL features and JsQuery don't support it.

Think about the following JSON:

  "message": "Server is started.",
  "host": "",
  "tags": [

You can find the JSON by full text search with server, example, or web because all text values are full text search target.


PGroonga provides the following two operators for searching against jsonb:

@> operator is simpler than @@ operator but you can't use complex condition such as range search.

@@ operator is more complex than @> operator but you can use complex condition. You can also use full text search against all text values in JSON.

Comparison with GIN

PostgreSQL provides built-in fast jsonb search feature by GIN.

Here are differences between PGroonga and GIN: