Skip to content

Commit fd23a40

Browse files
authored
[docs] Fix CREATE INDEX examples in 3.x and 4.x Chinese docs and English docs (#3593)
## What changed Fix incorrect SQL examples in the Chinese `CREATE INDEX` documentation for Doris 3.x and 4.x. The examples missed the required indexed column list after the table name. This PR also clarifies that the column list is mandatory in the syntax description. ## Versions - [ ] dev - [x] 3.x - [x] 4.x - [ ] 2.1 ## Languages - [x] English - [x] Chinese
1 parent 967255a commit fd23a40

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

  • i18n/zh-CN/docusaurus-plugin-content-docs
  • versioned_docs

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ 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");
94-
```
93+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
94+
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ 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

9696
- 在table1 上创建 ANN 索引 index3

versioned_docs/version-3.x/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ 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");
99-
```
98+
CREATE INDEX index2 ON table1(col1) USING NGRAM_BF PROPERTIES("gram_size"="3", "bf_size"="1024");
99+
```

versioned_docs/version-4.x/sql-manual/sql-statements/table-and-view/index/CREATE-INDEX.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,15 @@ The user executing this SQL command must have at least the following permissions
8787

8888

8989
```sql
90-
it fails .. must mention to add col. in the documentation
91-
CREATE INDEX index1 ON t1sa (col1) USING INVERTED;
90+
CREATE INDEX index1 ON table1(col1) USING INVERTED;
9291
```
9392

9493
- Create an NGram BloomFilter index `index2` on `table1`
9594

9695

9796

9897
```sql
99-
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");
10099
```
101100

102101

0 commit comments

Comments
 (0)