Skip to content

Commit 471dd32

Browse files
authored
[fix] fix create-index (#3609)
1 parent 5bc3c9a commit 471dd32

4 files changed

Lines changed: 30 additions & 26 deletions

File tree

  • docs-next/sql-manual/sql-statements/table-and-view/index
  • docs/sql-manual/sql-statements/table-and-view/index
  • i18n/zh-CN
    • docusaurus-plugin-content-docs-next/current/sql-manual/sql-statements/table-and-view/index
    • docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/index

docs-next/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,25 @@ The user executing this SQL command must have at least the following permissions
8787

8888

8989
```sql
90-
CREATE INDEX index1 ON table1 USING INVERTED;
90+
CREATE INDEX index1 ON table1(col1) USING INVERTED;
9191
```
9292

9393
- Create an NGram BloomFilter index `index2` on `table1`
9494

9595

9696

9797
```sql
98-
CREATE INDEX index2 ON table1 USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
98+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
9999
```
100100

101+
101102
- Create an ANN index `index3` on `table1` (`embedding`) vector column.
102103

104+
103105
```sql
104106
CREATE INDEX index3 ON table1 (`embedding`) USING ANN PROPERTIES(
105-
"index_type"="hnsw",
106-
"metric_type"="l2_distance",
107-
"dim"="128"
107+
"index_type"="hnsw",
108+
"metric_type"="l2_distance",
109+
"dim"="128"
108110
);
109-
```
111+
```

docs/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,25 @@ The user executing this SQL command must have at least the following permissions
8787

8888

8989
```sql
90-
CREATE INDEX index1 ON table1 USING INVERTED;
90+
CREATE INDEX index1 ON table1(col1) USING INVERTED;
9191
```
9292

9393
- Create an NGram BloomFilter index `index2` on `table1`
9494

9595

9696

9797
```sql
98-
CREATE INDEX index2 ON table1 USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
98+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
9999
```
100100

101+
101102
- Create an ANN index `index3` on `table1` (`embedding`) vector column.
102103

104+
103105
```sql
104106
CREATE INDEX index3 ON table1 (`embedding`) USING ANN PROPERTIES(
105-
"index_type"="hnsw",
106-
"metric_type"="l2_distance",
107-
"dim"="128"
107+
"index_type"="hnsw",
108+
"metric_type"="l2_distance",
109+
"dim"="128"
108110
);
109-
```
111+
```

i18n/zh-CN/docusaurus-plugin-content-docs-next/current/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
```sql
1616
CREATE INDEX [IF NOT EXISTS] <index_name>
1717
ON <table_name> (<column_name> [, ...])
18-
[USING {INVERTED | NGRAM_BF}]
18+
[USING {INVERTED | NGRAM_BF | ANN}]
1919
[PROPERTIES ("<key>" = "<value>"[ , ...])]
2020
[COMMENT '<index_comment>']
2121
```
@@ -84,21 +84,21 @@ CREATE INDEX [IF NOT EXISTS] <index_name>
8484
- 在 table1 上创建倒排索引 index1
8585

8686
```sql
87-
CREATE INDEX index1 ON table1 USING INVERTED;
87+
CREATE INDEX index1 ON table1(col1) USING INVERTED;
8888
```
8989

9090
- 在 table1 上创建 NGram BloomFilter 索引 index2
9191

9292
```sql
93-
CREATE INDEX index2 ON table1 USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
93+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
9494
```
9595

96-
- 在 table1 上创建 ANN 索引 index3
96+
- 在table1 上创建 ANN 索引 index3
9797

9898
```sql
9999
CREATE INDEX index3 ON table1 (`embedding`) USING ANN PROPERTIES(
100-
"index_type"="hnsw",
101-
"metric_type"="l2_distance",
102-
"dim"="128"
100+
"index_type"="hnsw",
101+
"metric_type"="l2_distance",
102+
"dim"="128"
103103
);
104104
```

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
```sql
1616
CREATE INDEX [IF NOT EXISTS] <index_name>
1717
ON <table_name> (<column_name> [, ...])
18-
[USING {INVERTED | NGRAM_BF}]
18+
[USING {INVERTED | NGRAM_BF | ANN}]
1919
[PROPERTIES ("<key>" = "<value>"[ , ...])]
2020
[COMMENT '<index_comment>']
2121
```
@@ -84,21 +84,21 @@ CREATE INDEX [IF NOT EXISTS] <index_name>
8484
- 在 table1 上创建倒排索引 index1
8585

8686
```sql
87-
CREATE INDEX index1 ON table1 USING INVERTED;
87+
CREATE INDEX index1 ON table1(col1) USING INVERTED;
8888
```
8989

9090
- 在 table1 上创建 NGram BloomFilter 索引 index2
9191

9292
```sql
93-
CREATE INDEX index2 ON table1 USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
93+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
9494
```
9595

96-
- 在 table1 上创建 ANN 索引 index3
96+
- 在table1 上创建 ANN 索引 index3
9797

9898
```sql
9999
CREATE INDEX index3 ON table1 (`embedding`) USING ANN PROPERTIES(
100-
"index_type"="hnsw",
101-
"metric_type"="l2_distance",
102-
"dim"="128"
100+
"index_type"="hnsw",
101+
"metric_type"="l2_distance",
102+
"dim"="128"
103103
);
104104
```

0 commit comments

Comments
 (0)