From 5dc9d9681d5ccacd38af37118ba725347e8b6d5e Mon Sep 17 00:00:00 2001 From: Ryan Kuo Date: Thu, 19 Dec 2024 13:48:21 -0500 Subject: [PATCH] fix copy buttons on Trigram Indexes page --- src/current/v23.1/trigram-indexes.md | 5 +++++ src/current/v23.2/trigram-indexes.md | 5 +++++ src/current/v24.1/trigram-indexes.md | 5 +++++ src/current/v24.2/trigram-indexes.md | 5 +++++ src/current/v24.3/trigram-indexes.md | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/src/current/v23.1/trigram-indexes.md b/src/current/v23.1/trigram-indexes.md index 3464b89560c..474b258163a 100644 --- a/src/current/v23.1/trigram-indexes.md +++ b/src/current/v23.1/trigram-indexes.md @@ -112,6 +112,7 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching]( Suppose you have a table with the following columns: +{% include_cached copy-clipboard.html %} ~~~ sql CREATE TABLE t (a INT, w STRING); ~~~ @@ -119,24 +120,28 @@ CREATE TABLE t (a INT, w STRING); The following examples illustrate how to create various trigram indexes on column `w`. A GIN index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~sql CREATE INDEX ON t USING GIN (w gin_trgm_ops); ~~~ A partial index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0; ~~~ A multi-column index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (a, w gin_trgm_ops); ~~~ An expression index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN ((json_col->>'json_text_field')) diff --git a/src/current/v23.2/trigram-indexes.md b/src/current/v23.2/trigram-indexes.md index 3464b89560c..474b258163a 100644 --- a/src/current/v23.2/trigram-indexes.md +++ b/src/current/v23.2/trigram-indexes.md @@ -112,6 +112,7 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching]( Suppose you have a table with the following columns: +{% include_cached copy-clipboard.html %} ~~~ sql CREATE TABLE t (a INT, w STRING); ~~~ @@ -119,24 +120,28 @@ CREATE TABLE t (a INT, w STRING); The following examples illustrate how to create various trigram indexes on column `w`. A GIN index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~sql CREATE INDEX ON t USING GIN (w gin_trgm_ops); ~~~ A partial index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0; ~~~ A multi-column index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (a, w gin_trgm_ops); ~~~ An expression index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN ((json_col->>'json_text_field')) diff --git a/src/current/v24.1/trigram-indexes.md b/src/current/v24.1/trigram-indexes.md index 9ef98a40819..f1374655c30 100644 --- a/src/current/v24.1/trigram-indexes.md +++ b/src/current/v24.1/trigram-indexes.md @@ -112,6 +112,7 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching]( Suppose you have a table with the following columns: +{% include_cached copy-clipboard.html %} ~~~ sql CREATE TABLE t (a INT, w STRING); ~~~ @@ -119,24 +120,28 @@ CREATE TABLE t (a INT, w STRING); The following examples illustrate how to create various trigram indexes on column `w`. A GIN index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~sql CREATE INDEX ON t USING GIN (w gin_trgm_ops); ~~~ A partial index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0; ~~~ A multi-column index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (a, w gin_trgm_ops); ~~~ An expression index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN ((json_col->>'json_text_field')) diff --git a/src/current/v24.2/trigram-indexes.md b/src/current/v24.2/trigram-indexes.md index 9ef98a40819..f1374655c30 100644 --- a/src/current/v24.2/trigram-indexes.md +++ b/src/current/v24.2/trigram-indexes.md @@ -112,6 +112,7 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching]( Suppose you have a table with the following columns: +{% include_cached copy-clipboard.html %} ~~~ sql CREATE TABLE t (a INT, w STRING); ~~~ @@ -119,24 +120,28 @@ CREATE TABLE t (a INT, w STRING); The following examples illustrate how to create various trigram indexes on column `w`. A GIN index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~sql CREATE INDEX ON t USING GIN (w gin_trgm_ops); ~~~ A partial index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0; ~~~ A multi-column index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (a, w gin_trgm_ops); ~~~ An expression index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN ((json_col->>'json_text_field')) diff --git a/src/current/v24.3/trigram-indexes.md b/src/current/v24.3/trigram-indexes.md index 9ef98a40819..f1374655c30 100644 --- a/src/current/v24.3/trigram-indexes.md +++ b/src/current/v24.3/trigram-indexes.md @@ -112,6 +112,7 @@ For usage examples, see [Use a trigram index to speed up fuzzy string matching]( Suppose you have a table with the following columns: +{% include_cached copy-clipboard.html %} ~~~ sql CREATE TABLE t (a INT, w STRING); ~~~ @@ -119,24 +120,28 @@ CREATE TABLE t (a INT, w STRING); The following examples illustrate how to create various trigram indexes on column `w`. A GIN index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~sql CREATE INDEX ON t USING GIN (w gin_trgm_ops); ~~~ A partial index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (w gin_trgm_ops) WHERE a > 0; ~~~ A multi-column index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN (a, w gin_trgm_ops); ~~~ An expression index with trigram matching enabled: + {% include_cached copy-clipboard.html %} ~~~ sql CREATE INDEX ON t USING GIN ((json_col->>'json_text_field'))