1CREATE TABLE memos (
2  id integer,
3  content text
4);
5INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
6INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
7INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
8INSERT INTO memos VALUES (4, 'groonga command is provided.');
9CREATE INDEX grnindex ON memos USING pgroonga (content pgroonga_text_regexp_ops);
10SET enable_seqscan = off;
11SET enable_indexscan = on;
12SET enable_bitmapscan = off;
13SELECT id, content
14  FROM memos
15 WHERE content LIKE '%Groonga%';
16 id |                        content
17----+-------------------------------------------------------
18  2 | Groonga is fast full text search engine.
19  3 | PGroonga is a PostgreSQL extension that uses Groonga.
20(2 rows)
21
22DROP TABLE memos;
23