Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add fulltext options to data index doc #1469

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/user-guide/manage-data/data-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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='English', 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
```

使用全文索引时需要注意以下限制:

- 存储开销较大,因需要保存词条和位置信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
```

使用全文索引时需要注意以下限制:

- 存储开销较大,因需要保存词条和位置信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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='English', 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
Expand Down
Loading