GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • News
  • Overview
  • Documents
  • Install
  • Upgrade
  • Tutorial
  • FAQ
  • How to
  • Reference manual
  • Development
  • Community
  • Users
  • Support
  • 日本語

This view

  • Original page
  • New address

GeezerVison is showing pgroonga.github.io — jsonb support | PGroonga

This is a document for PGroonga 2.0.0 or later. See PGroonga 1.X document when you're using PGroonga 1.X.

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": "www.example.com",
  "tags": [
    "web",
  ]
}

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

Operators

PGroonga provides the following two operators for searching against jsonb:

  • @> operator
  • @@ operator

@> 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:

  • Index creation time: No difference
  • Search time: PGroonga is a bit faster
  • Features: PGroonga provides more search features
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.