mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
GIN: Generalized Inverted iNdex.
text[], int4[], Tsearch2 support for GIN.
This commit is contained in:
@ -3001,3 +3001,42 @@ select a is null, a from test_tsvector order by a;
|
||||
t |
|
||||
(514 rows)
|
||||
|
||||
drop index wowidx;
|
||||
create index wowidx on test_tsvector using gin (a);
|
||||
set enable_seqscan=off;
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
|
||||
count
|
||||
-------
|
||||
158
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr&qh';
|
||||
count
|
||||
-------
|
||||
17
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ 'eq&yt';
|
||||
count
|
||||
-------
|
||||
6
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ 'eq|yt';
|
||||
count
|
||||
-------
|
||||
98
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ '(eq&yt)|(wr&qh)';
|
||||
count
|
||||
-------
|
||||
23
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM test_tsvector WHERE a @@ '(eq|yt)&(wr|qh)';
|
||||
count
|
||||
-------
|
||||
39
|
||||
(1 row)
|
||||
|
||||
|
Reference in New Issue
Block a user