From 71742e69c2ecce37350ce1c07f4d75fd2de5295b Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Tue, 14 Jan 2025 11:25:54 +0800 Subject: [PATCH 1/3] docs: add fulltext options to data index doc --- docs/user-guide/manage-data/data-index.md | 15 +++++++++++++++ .../current/user-guide/manage-data/data-index.md | 14 ++++++++++++++ .../user-guide/manage-data/data-index.md | 14 ++++++++++++++ .../user-guide/manage-data/data-index.md | 14 ++++++++++++++ 4 files changed, 57 insertions(+) diff --git a/docs/user-guide/manage-data/data-index.md b/docs/user-guide/manage-data/data-index.md index 4615799c7..748a86dee 100644 --- a/docs/user-guide/manage-data/data-index.md +++ b/docs/user-guide/manage-data/data-index.md @@ -79,6 +79,21 @@ CREATE TABLE logs ( ); ``` + +Fulltext index supports options by `WITH`: +* `analyzer`: Sets the language analyzer for the fulltext index. Supported values are `English` and `Chinese`. Default to `English`. +* `case_sensitive`: Determines whether the fulltext index is case-sensitive. Supported values are `true` and `false`. Default to `false`. + +For example: + +```sql +CREATE TABLE logs ( + message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + `level` STRING PRIMARY KEY, + `timestamp` TIMESTAMP TIME INDEX, +); +``` + Fulltext index usually comes with following drawbacks: - Higher storage overhead compared to regular indexes due to storing word tokens and positions diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md index 0e7663508..dd748dcb2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md @@ -79,6 +79,20 @@ CREATE TABLE logs ( ); ``` +全文索引通过 `WITH` 支持以下选项: +* `analyzer`:设置全文索引的语言分析器。支持的值包括 `English`(英语)和 `Chinese`(中文)。默认值为 `English`。 +* `case_sensitive`:决定全文索引是否区分大小写。支持的值为 `true`(是)和 `false`(否)。默认值为 `false`。 + +示例: + +```sql +CREATE TABLE logs ( + message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + `level` STRING PRIMARY KEY, + `timestamp` TIMESTAMP TIME INDEX, +); +``` + 使用全文索引时需要注意以下限制: - 存储开销较大,因需要保存词条和位置信息 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md index 0e7663508..dd748dcb2 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md @@ -79,6 +79,20 @@ CREATE TABLE logs ( ); ``` +全文索引通过 `WITH` 支持以下选项: +* `analyzer`:设置全文索引的语言分析器。支持的值包括 `English`(英语)和 `Chinese`(中文)。默认值为 `English`。 +* `case_sensitive`:决定全文索引是否区分大小写。支持的值为 `true`(是)和 `false`(否)。默认值为 `false`。 + +示例: + +```sql +CREATE TABLE logs ( + message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + `level` STRING PRIMARY KEY, + `timestamp` TIMESTAMP TIME INDEX, +); +``` + 使用全文索引时需要注意以下限制: - 存储开销较大,因需要保存词条和位置信息 diff --git a/versioned_docs/version-0.11/user-guide/manage-data/data-index.md b/versioned_docs/version-0.11/user-guide/manage-data/data-index.md index 4615799c7..8a1f0d5dc 100644 --- a/versioned_docs/version-0.11/user-guide/manage-data/data-index.md +++ b/versioned_docs/version-0.11/user-guide/manage-data/data-index.md @@ -79,6 +79,20 @@ CREATE TABLE logs ( ); ``` +Fulltext index supports options by `WITH`: +* `analyzer`: Sets the language analyzer for the fulltext index. Supported values are `English` and `Chinese`. Default to `English`. +* `case_sensitive`: Determines whether the fulltext index is case-sensitive. Supported values are `true` and `false`. Default to `false`. + +For example: + +```sql +CREATE TABLE logs ( + message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + `level` STRING PRIMARY KEY, + `timestamp` TIMESTAMP TIME INDEX, +); +``` + Fulltext index usually comes with following drawbacks: - Higher storage overhead compared to regular indexes due to storing word tokens and positions From 7eba1fd68252fff8b9107a03217bc3411f2eac5a Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Tue, 14 Jan 2025 11:45:00 +0800 Subject: [PATCH 2/3] docs: style --- .../current/user-guide/manage-data/data-index.md | 2 +- .../version-0.11/user-guide/manage-data/data-index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md index dd748dcb2..c2c3a3346 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/manage-data/data-index.md @@ -79,7 +79,7 @@ CREATE TABLE logs ( ); ``` -全文索引通过 `WITH` 支持以下选项: +全文索引通过 `WITH` 支持以下选项: * `analyzer`:设置全文索引的语言分析器。支持的值包括 `English`(英语)和 `Chinese`(中文)。默认值为 `English`。 * `case_sensitive`:决定全文索引是否区分大小写。支持的值为 `true`(是)和 `false`(否)。默认值为 `false`。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md index dd748dcb2..c2c3a3346 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.11/user-guide/manage-data/data-index.md @@ -79,7 +79,7 @@ CREATE TABLE logs ( ); ``` -全文索引通过 `WITH` 支持以下选项: +全文索引通过 `WITH` 支持以下选项: * `analyzer`:设置全文索引的语言分析器。支持的值包括 `English`(英语)和 `Chinese`(中文)。默认值为 `English`。 * `case_sensitive`:决定全文索引是否区分大小写。支持的值为 `true`(是)和 `false`(否)。默认值为 `false`。 From 0ecd53b3a9f0d8ab809ac83f5330ce36ad75ec8f Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Tue, 14 Jan 2025 14:49:27 +0800 Subject: [PATCH 3/3] chore: use English for en doc --- docs/user-guide/manage-data/data-index.md | 2 +- .../version-0.11/user-guide/manage-data/data-index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/manage-data/data-index.md b/docs/user-guide/manage-data/data-index.md index 748a86dee..7c168ddcc 100644 --- a/docs/user-guide/manage-data/data-index.md +++ b/docs/user-guide/manage-data/data-index.md @@ -88,7 +88,7 @@ For example: ```sql CREATE TABLE logs ( - message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + message STRING FULLTEXT WITH(analyzer='English', case_sensitive='true'), `level` STRING PRIMARY KEY, `timestamp` TIMESTAMP TIME INDEX, ); diff --git a/versioned_docs/version-0.11/user-guide/manage-data/data-index.md b/versioned_docs/version-0.11/user-guide/manage-data/data-index.md index 8a1f0d5dc..973a2a7bb 100644 --- a/versioned_docs/version-0.11/user-guide/manage-data/data-index.md +++ b/versioned_docs/version-0.11/user-guide/manage-data/data-index.md @@ -87,7 +87,7 @@ For example: ```sql CREATE TABLE logs ( - message STRING FULLTEXT WITH(analyzer='Chinese', case_sensitive='true'), + message STRING FULLTEXT WITH(analyzer='English', case_sensitive='true'), `level` STRING PRIMARY KEY, `timestamp` TIMESTAMP TIME INDEX, );