collect
Description
Exports data to the specified index.
When the sme.core.data_units.search_enabled setting is enabled, you can specify a Data Unit name in the index parameter. The command writes data to the Data Unit's physical index.
Writing is supported only to a Data Unit in internal storage that has one specific index in physical_ref. Data Units with an index pattern, ClickHouse Data Units, and Search Spaces are not supported as targets. If the name matches a Search Space, the command returns an error.
When the sme.core.data_units.search_enabled setting is disabled, index is used as an index name; no Data Unit or Search Space lookup is performed.
Syntax
| collect index=<string>
Required Arguments
| Parameter | Syntax | Description |
|---|---|---|
index | index=<string> | The index to which the data will be exported. |
Examples
Example 1
This example demonstrates the basic usage of the collect command to create a backup copy of data. The command performs the following operations:
- Retrieves all data from the
appleindex using thesourcecommand - Copies the retrieved data to a new index
apple_copy
source apple
| collect index=apple_copy