Index Operations
Move to ClickHouse
API to initiate the move of a specified index: POST _ism/move_to_click/<index_name>.
Path Parameters
| Name | Type | Description |
|---|---|---|
index_name | string | The name of the index to be moved. |
Request Body Parameters
| Name | Type | Description |
|---|---|---|
connection_id | string | The connection identifier for connecting to ClickHouse, through which the move will be performed. |
index_name_pattern | string | A regular expression pattern for extracting the table name, must contain a named group (?<name>) |
fetch_size | integer | The batch size for processed documents. The recommended value is between 10000 and 100000 , depending on the document size. |
data_scheme_parameters | object | Additional settings affecting the interaction with the table in ClickHouse. |
Scheme data_scheme_parameters
| Name | Type | Description |
|---|---|---|
ttl_interval | string | The Time-To-Live interval for documents in the table, in the format interval <count> <time unit> Available intervals (set for the entire table upon creation). |
ttl_column | string | The name of the datetime-type field used as the basis for TTL calculation. |
cluster_name | string | The ClickHouse cluster name (a required field when replication = true or distributed = true). |
replication | boolean | Flag indicating whether to create a replicated table during the data transfer (considered if the move initiates the creation of a new table). |
distributed | boolean | Flag indicating whether to create a distributed table during the data transfer (considered if the move initiates the creation of a new table). |
Example Request
POST _ism/move_to_click/clickhouse_test-600006
{
"connection_id": "TestClick",
"index_name_pattern": "(?<name>.*?)-\\d+",
"fetch_size": 100000,
"data_scheme_parameters": {
"ttl_interval": "interval 30 day",
"cluster_name": "sm_cluster",
"replication": true,
"distributed": true
}
}