Skip to main content
Version: 6.2

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.

Limitations on Writing Through a Data Unit

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​

ParameterSyntaxDescription
indexindex=<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:

  1. Retrieves all data from the apple index using the source command
  2. Copies the retrieved data to a new index apple_copy
source apple
| collect index=apple_copy