From 8565395282001d0832acd84bae8cc25bb6890d9e Mon Sep 17 00:00:00 2001 From: burggraf Date: Mon, 30 Aug 2021 05:31:32 -0700 Subject: [PATCH 1/3] Added missing index statement --- web/docs/guides/database/full-text-search.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/docs/guides/database/full-text-search.mdx b/web/docs/guides/database/full-text-search.mdx index 8b08de50a5e..5dbb3a40af9 100644 --- a/web/docs/guides/database/full-text-search.mdx +++ b/web/docs/guides/database/full-text-search.mdx @@ -396,7 +396,8 @@ alter table books add column fts tsvector generated always as to_tsvector(description || ' ' || title); - + +create index books_fts on books (fts); -- generate the index select id, fts from books; From dd493fcba02e13d9240fb0c7f8628e1ae3481c25 Mon Sep 17 00:00:00 2001 From: burggraf Date: Mon, 30 Aug 2021 05:36:08 -0700 Subject: [PATCH 2/3] added "stored" to the generated column --- web/docs/guides/database/full-text-search.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/guides/database/full-text-search.mdx b/web/docs/guides/database/full-text-search.mdx index 5dbb3a40af9..1755448f82c 100644 --- a/web/docs/guides/database/full-text-search.mdx +++ b/web/docs/guides/database/full-text-search.mdx @@ -395,7 +395,7 @@ values={[ alter table books add column - fts tsvector generated always as to_tsvector(description || ' ' || title); + fts tsvector generated always as to_tsvector(description || ' ' || title) stored; create index books_fts on books (fts); -- generate the index From 9091e9a11a3929d906ffe5099b8aa581d5014d8f Mon Sep 17 00:00:00 2001 From: burggraf Date: Mon, 30 Aug 2021 06:03:43 -0700 Subject: [PATCH 3/3] "using gin" for index --- web/docs/guides/database/full-text-search.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/guides/database/full-text-search.mdx b/web/docs/guides/database/full-text-search.mdx index 1755448f82c..5a380a6e90c 100644 --- a/web/docs/guides/database/full-text-search.mdx +++ b/web/docs/guides/database/full-text-search.mdx @@ -397,7 +397,7 @@ alter table add column fts tsvector generated always as to_tsvector(description || ' ' || title) stored; -create index books_fts on books (fts); -- generate the index +create index books_fts on books using gin (fts); -- generate the index select id, fts from books;