Skip to main content
Version: 5.1

Index Operations

Move to ClickHouse

API to initiate the move of a specified index: POST _ism/move_to_click/<index_name>.

Path Parameters

NameTypeDescription
index_namestringThe name of the index to be moved.

Request Body Parameters

NameTypeDescription
connection_idstringThe connection identifier for connecting to ClickHouse, through which the move will be performed.
index_name_patternstringA regular expression pattern for extracting the table name, must contain a named group (?<name>)
fetch_sizeintegerThe batch size for processed documents. The recommended value is between 10000 and 100000 , depending on the document size.
data_scheme_parametersobjectAdditional settings affecting the interaction with the table in ClickHouse.

Scheme data_scheme_parameters

NameTypeDescription
ttl_intervalstringThe 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_columnstringThe name of the datetime-type field used as the basis for TTL calculation.
cluster_namestringThe ClickHouse cluster name (a required field when replication = true or distributed = true).
replicationbooleanFlag indicating whether to create a replicated table during the data transfer (considered if the move initiates the creation of a new table).
distributedbooleanFlag 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
}
}