File tree Expand file tree Collapse file tree 6 files changed +78
-16
lines changed
sql-reference/10-sql-commands/00-ddl/07-ngram-index
sql-reference/10-sql-commands/00-ddl/07-ngram-index Expand file tree Collapse file tree 6 files changed +78
-16
lines changed Original file line number Diff line number Diff line change @@ -164,11 +164,12 @@ TableScan
164164
165165完整命令参考详见 [ Ngram 索引] ( /sql/sql-commands/ddl/ngram-index/ ) 。
166166
167- | 命令 | 用途 |
168- | ---------| ---------|
167+ | 命令 | 用途 |
168+ | ---------------------------------------------------------- | ------------- ---------|
169169| ` CREATE NGRAM INDEX name ON table(column) gram_size = N ` | 创建含 N 字符片段的 ngram 索引 |
170- | ` SHOW INDEXES ` | 列出所有索引(含 ngram 索引) |
171- | ` DROP NGRAM INDEX name ON table ` | 删除 ngram 索引 |
170+ | ` SHOW INDEXES ` | 列出所有索引(含 ngram 索引) |
171+ | ` REFRESH NGRAM INDEX name ON table ` | 刷新 ngram 索引 |
172+ | ` DROP NGRAM INDEX name ON table ` | 删除 ngram 索引 |
172173
173174:::tip ** 使用场景**
174175** 适用:**
Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ import EEFeature from '@site/src/components/EEFeature';
99
1010## Ngram 索引管理
1111
12- | 命令 | 描述 |
13- | ---------| -------------|
14- | [ CREATE NGRAM INDEX] ( create-ngram-index.md ) | 创建新的 Ngram 索引用于高效子字符串搜索 |
15- | [ DROP NGRAM INDEX] ( drop-ngram-index.md ) | 删除 Ngram 索引 |
12+ | 命令 | 描述 |
13+ | -----------------------------------------------| -------------------------|
14+ | [ CREATE NGRAM INDEX] ( create-ngram-index.md ) | 创建新的 Ngram 索引用于高效子字符串搜索 |
15+ | [ REFRESH NGRAM INDEX] ( refresh-ngram-index.md ) | 刷新 Ngram 索引 |
16+ | [ DROP NGRAM INDEX] ( drop-ngram-index.md ) | 删除 Ngram 索引 |
1617
1718::: note
1819Databend 的 Ngram 索引支持在文本数据中高效执行子字符串及模式匹配搜索,可显著提升 LIKE 等操作的性能。
Original file line number Diff line number Diff line change 1+ ---
2+ title : REFRESH NGRAM INDEX
3+ sidebar_position : 2
4+ ---
5+
6+ import FunctionDescription from '@site/src /components/FunctionDescription';
7+
8+ <FunctionDescription description =" Introduced or updated: v1.2.726 " />
9+
10+ import EEFeature from '@site/src /components/EEFeature';
11+
12+ <EEFeature featureName =' NGRAM INDEX ' />
13+
14+ 从表中刷新现有的 NGRAM 索引。
15+
16+ ## 语法
17+
18+ ``` sql
19+ REFRESH NGRAM INDEX [IF EXISTS] < index_name>
20+ ON [< database> .]< table_name> ;
21+ ```
22+
23+ ## 示例
24+
25+ 以下示例从 ` amazon_reviews_ngram ` 表中刷新 ` idx1 ` 索引:
26+
27+ ``` sql
28+ REFRESH NGRAM INDEX idx1 ON amazon_reviews_ngram;
29+ ```
Original file line number Diff line number Diff line change @@ -165,11 +165,12 @@ TableScan
165165
166166For complete command reference, see [ Ngram Index] ( /sql/sql-commands/ddl/ngram-index/ ) .
167167
168- | Command | Purpose |
169- | ---------| ---------|
168+ | Command | Purpose |
169+ | ---------------------------------------------------------- | ------------------------------------- ---------|
170170| ` CREATE NGRAM INDEX name ON table(column) gram_size = N ` | Create ngram index with N-character segments |
171- | ` SHOW INDEXES ` | List all indexes including ngram indexes |
172- | ` DROP NGRAM INDEX name ON table ` | Remove ngram index |
171+ | ` SHOW INDEXES ` | List all indexes including ngram indexes |
172+ | ` REFRESH NGRAM INDEX name ON table ` | Refresh ngram index |
173+ | ` DROP NGRAM INDEX name ON table ` | Remove ngram index |
173174
174175:::tip ** When to Use Ngram Indexes**
175176** Ideal for:**
Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ This page provides a comprehensive overview of Ngram index operations in Databen
99
1010## Ngram Index Management
1111
12- | Command | Description |
13- | ---------| -------------|
14- | [ CREATE NGRAM INDEX] ( create-ngram-index.md ) | Creates a new Ngram index for efficient substring search |
15- | [ DROP NGRAM INDEX] ( drop-ngram-index.md ) | Removes an Ngram index |
12+ | Command | Description |
13+ | -----------------------------------------------| ----------------------------------------------------------|
14+ | [ CREATE NGRAM INDEX] ( create-ngram-index.md ) | Creates a new Ngram index for efficient substring search |
15+ | [ REFRESH NGRAM INDEX] ( refresh-ngram-index.md ) | Refreshes an Ngram index |
16+ | [ DROP NGRAM INDEX] ( drop-ngram-index.md ) | Removes an Ngram index |
1617
1718::: note
1819Ngram indexes in Databend enable efficient substring and pattern matching searches within text data, improving performance for LIKE and similar operations.
Original file line number Diff line number Diff line change 1+ ---
2+ title : REFRESH NGRAM INDEX
3+ sidebar_position : 2
4+ ---
5+
6+ import FunctionDescription from '@site/src /components/FunctionDescription';
7+
8+ <FunctionDescription description =" Introduced or updated: v1.2.726 " />
9+
10+ import EEFeature from '@site/src /components/EEFeature';
11+
12+ <EEFeature featureName =' NGRAM INDEX ' />
13+
14+ Refresh an existing NGRAM index from a table.
15+
16+ ## Syntax
17+
18+ ``` sql
19+ REFRESH NGRAM INDEX [IF EXISTS] < index_name>
20+ ON [< database> .]< table_name> ;
21+ ```
22+
23+ ## Examples
24+
25+ The following example refreshes the ` idx1 ` index from the ` amazon_reviews_ngram ` table:
26+
27+ ``` sql
28+ REFRESH NGRAM INDEX idx1 ON amazon_reviews_ngram;
29+ ```
You can’t perform that action at this time.
0 commit comments