Kouhei Sutou
null+****@clear*****
Mon May 1 18:17:53 JST 2017
Kouhei Sutou 2017-05-01 18:17:53 +0900 (Mon, 01 May 2017) New Revision: dbfe389bd8c7dc8709f8ec4470d75b6c76e510b0 https://github.com/pgroonga/pgroonga/commit/dbfe389bd8c7dc8709f8ec4470d75b6c76e510b0 Message: test: add tests for $? with v1 operator class Added files: expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql Added: expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out (+22 -0) 100644 =================================================================== --- /dev/null +++ expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out 2017-05-01 18:17:53 +0900 (3e09e45) @@ -0,0 +1,22 @@ +CREATE TABLE memos ( + id integer, + content text +); +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); +SET enable_seqscan = off; +SET enable_indexscan = off; +SET enable_bitmapscan = on; +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + id | content +----+------------------------------------------ + 1 | PostgreSQL is a RDBMS. + 2 | Groonga is fast full text search engine. +(2 rows) + +DROP TABLE memos; Added: expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out (+22 -0) 100644 =================================================================== --- /dev/null +++ expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out 2017-05-01 18:17:53 +0900 (4361ac7) @@ -0,0 +1,22 @@ +CREATE TABLE memos ( + id integer, + content text +); +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); +SET enable_seqscan = off; +SET enable_indexscan = on; +SET enable_bitmapscan = off; +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + id | content +----+------------------------------------------ + 1 | PostgreSQL is a RDBMS. + 2 | Groonga is fast full text search engine. +(2 rows) + +DROP TABLE memos; Added: expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out (+23 -0) 100644 =================================================================== --- /dev/null +++ expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out 2017-05-01 18:17:53 +0900 (552025e) @@ -0,0 +1,23 @@ +SET search_path = "$user",public,pgroonga,pg_catalog; +CREATE TABLE memos ( + id integer, + content text +); +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); +SET enable_seqscan = on; +SET enable_indexscan = off; +SET enable_bitmapscan = off; +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + id | content +----+------------------------------------------ + 1 | PostgreSQL is a RDBMS. + 2 | Groonga is fast full text search engine. +(2 rows) + +DROP TABLE memos; Added: sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql (+21 -0) 100644 =================================================================== --- /dev/null +++ sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql 2017-05-01 18:17:53 +0900 (b0a2d71) @@ -0,0 +1,21 @@ +CREATE TABLE memos ( + id integer, + content text +); + +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); + +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); + +SET enable_seqscan = off; +SET enable_indexscan = off; +SET enable_bitmapscan = on; + +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + +DROP TABLE memos; Added: sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql (+21 -0) 100644 =================================================================== --- /dev/null +++ sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql 2017-05-01 18:17:53 +0900 (e4dfb5a) @@ -0,0 +1,21 @@ +CREATE TABLE memos ( + id integer, + content text +); + +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); + +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); + +SET enable_seqscan = off; +SET enable_indexscan = on; +SET enable_bitmapscan = off; + +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + +DROP TABLE memos; Added: sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql (+23 -0) 100644 =================================================================== --- /dev/null +++ sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql 2017-05-01 18:17:53 +0900 (e0ade33) @@ -0,0 +1,23 @@ +SET search_path = "$user",public,pgroonga,pg_catalog; + +CREATE TABLE memos ( + id integer, + content text +); + +INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.'); +INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.'); +INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.'); + +CREATE INDEX grnindex ON memos + USING pgroonga (content pgroonga.text_full_text_search_ops); + +SET enable_seqscan = on; +SET enable_indexscan = off; +SET enable_bitmapscan = off; + +SELECT id, content + FROM memos + WHERE content &? 'rdbms OR engine'; + +DROP TABLE memos; -------------- next part -------------- HTML����������������������������... 다운로드