1CREATE TABLE memos ( 2 id integer, 3 tag text 4); 5INSERT INTO memos VALUES (1, 'PostgreSQL'); 6INSERT INTO memos VALUES (2, 'PostgreSQL Groonga'); 7INSERT INTO memos VALUES (3, 'Groonga'); 8CREATE INDEX grnindex ON memos 9 USING pgroonga (tag) 10 WITH (tokenizer = 'none'); 11SET enable_seqscan = off; 12SET enable_indexscan = on; 13SET enable_bitmapscan = off; 14SELECT id, tag 15 FROM memos 16 WHERE tag %% 'PostgreSQL'; 17 id | tag 18----+------------ 19 1 | PostgreSQL 20(1 row) 21 22SELECT id, tag 23 FROM memos 24 WHERE tag %% 'PostgreSQL Groonga'; 25 id | tag 26----+-------------------- 27 2 | PostgreSQL Groonga 28(1 row) 29 30DROP TABLE memos; 31