You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support `TSVECTOR` type, `GIST` and `GIN` operations
8
+
9
+
The pg_trgm module provides GiST and GIN index operator classes that allow you to create an index over a text column for the purpose of very fast similarity searches
10
+
11
+
```sql
12
+
CREATE EXTENSION pg_trgm;
13
+
```
8
14
9
15
String is the input and output type for the table API for `TSVECTOR` columns
CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title || ' ' || body));
2
2
-- create a GIN index to speed up the search
3
3
CREATE INDEX textsearch_idx ON pgweb USING GIN (textsearchable_index_col);
4
-
5
-
4
+
-- The https://www.postgresql.org/docs/current/pgtrgm.html module provides GiST and GIN index operator classes that allow you to create an index over a text column for the purpose of very fast similarity searches
5
+
CREATE INDEX pgweb_body_trgm ON pgweb USING GIST (body gist_trgm_ops(siglen=16));
0 commit comments