Skip to content

Commit

Permalink
docs: add fulltext options to data index doc (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 authored Jan 14, 2025
1 parent d873fe0 commit 7d11389
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
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
14 changes: 14 additions & 0 deletions versioned_docs/version-0.11/user-guide/manage-data/data-index.md
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

0 comments on commit 7d11389

Please sign in to comment.