You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "airborne12 (via GitHub)" <gi...@apache.org> on 2023/06/26 09:57:35 UTC

[GitHub] [doris] airborne12 commented on a diff in pull request #21184: [Docs](inverted index) update docs for build index

airborne12 commented on code in PR #21184:
URL: https://github.com/apache/doris/pull/21184#discussion_r1241935577


##########
docs/en/docs/data-table/index/inverted-index.md:
##########
@@ -99,13 +99,35 @@ table_properties;
 ```
 
 - add an inverted index to existed table
+
+**Before version 2.0-beta:**
 ```sql
 -- syntax 1
 CREATE INDEX idx_name ON table_name(column_name) USING INVERTED [PROPERTIES("parser" = "english|chinese|unicode")] [COMMENT 'your comment'];
 -- syntax 2
 ALTER TABLE table_name ADD INDEX idx_name(column_name) USING INVERTED [PROPERTIES("parser" = "english|chinese|unicode")] [COMMENT 'your comment'];
 ```
 
+**After version 2.0-beta (including 2.0-beta):**
+
+The above 'create/add index' operation only generates inverted index for incremental data. The syntax of build index is added to add inverted index to stock data:
+```sql
+-- syntax 1, add inverted index to the stock data of the whole table by default
+BUILD INDEX index_name ON table_name;
+-- syntax 2, partition can be specified, and one or more can be specified
+BUILD INDEX index_name ON table_name PARTITIONS(partition_name1, partition_name2);
+```
+(**The above 'create/add index' operation needs to be executed before executing the build index**)
+
+To view the progress of the `build index`, you can use the following statement
+```sql
+show build index [FROM db_name];
+-- Example 1: Viewing the progress of all build index tasks
+show build index;
+-- Example 2: Viewing the progress of the build index task for a specified table
+show build index wehre TableName = "table1";

Review Comment:
   typo



##########
docs/en/docs/data-table/index/inverted-index.md:
##########
@@ -99,13 +99,35 @@ table_properties;
 ```
 
 - add an inverted index to existed table
+
+**Before version 2.0-beta:**
 ```sql
 -- syntax 1
 CREATE INDEX idx_name ON table_name(column_name) USING INVERTED [PROPERTIES("parser" = "english|chinese|unicode")] [COMMENT 'your comment'];
 -- syntax 2
 ALTER TABLE table_name ADD INDEX idx_name(column_name) USING INVERTED [PROPERTIES("parser" = "english|chinese|unicode")] [COMMENT 'your comment'];
 ```
 
+**After version 2.0-beta (including 2.0-beta):**
+
+The above 'create/add index' operation only generates inverted index for incremental data. The syntax of build index is added to add inverted index to stock data:
+```sql
+-- syntax 1, add inverted index to the stock data of the whole table by default
+BUILD INDEX index_name ON table_name;
+-- syntax 2, partition can be specified, and one or more can be specified
+BUILD INDEX index_name ON table_name PARTITIONS(partition_name1, partition_name2);
+```
+(**The above 'create/add index' operation needs to be executed before executing the build index**)
+
+To view the progress of the `build index`, you can use the following statement
+```sql
+show build index [FROM db_name];
+-- Example 1: Viewing the progress of all build index tasks
+show build index;
+-- Example 2: Viewing the progress of the build index task for a specified table
+show build index wehre TableName = "table1";

Review Comment:
   where



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org