Note:Only autonomous indices can be created.
Developed by Tencent Cloud, the autonomous index feature is suitable for time series data use cases such as log analysis and Ops monitoring, and can achieve index lifecycle management and automatic sharding optimization, with improved read and write efficiency. This feature is naturally applicable to clusters on v7.14.2 created after June 1, 2022 and is supported for older clusters on this version after a cluster restart. To use this feature in clusters on earlier versions, upgrade them to v7.14.2 first.
Deduction rule: When the field value is true
or false
, the mapping type is boolean
; when the field value is an integer, the mapping type is long
; when the field value is a floating point, the mapping type is double
; when the field value is a string with 36 or fewer characters, the mapping type is keyword
; when the field value is a string with more than 36 characters, the mapping type is text
; when the field value is a string in date format, the mapping type is date
; when the field value supports nesting, the mapping type is object
.
Enter the following JSON-formatted data sample in the Enter sample for automatic configuration input box:
{
"bool_field": true,
"date_field": "2022/01/26 00:00:00",
"double_field": 3.14,
"keyword_field": "This is a line of text that does not require word segmentation",
"long_field": 126,
"object_field": {
"sub_field": 2022
},
"text_field": "This is a line of text that requires word segmentation. Text with more than 36 characters will be identified as requiring word segmentation and defined as the text type"
}
The parsing result is as shown below:
Field mapping splits the original data into multiple segments by field (i.e., key:value) for indexing and search as follows:
Parameter | Description |
---|---|
Name of the field in the written data | |
Field type | Field data type. Valid values: boolean, keyword, long, double, date, text. More field types are supported in the JSON mode. For more information, see Field data types. |
Include Chinese characters | This feature can be enabled if the field contains Chinese characters and you want to search for Chinese characters, but it will increase the index size. After this feature is enabled, the ik_max_word analyzer will be applied to the text field by default. |
Enable index | Enabling this feature allows for creating an index for this field for search. |
Enable statistics | Enabling this option allows for statistical analysis of field values, but it increases the index size. |
Time field
The time field refers to the date field in the data. This field records the data creation time and cannot be modified after the index is created.
Write mode
Data is written to the index. This mode cannot be changed after the index is created successfully. Currently, two write modes are supported:
Storage by tier
Storage by tier indicates that you can store indices on nodes with different attributes based on their access frequency. For example, you can store less-frequently queried and updated data on a warm tier for cost savings.
The time it takes to migrate an index to a tier is calculated from the index rolling update start.
Deletion upon expiry
The Delete upon expiry option supports deleting historical data based on the Max age and Max size.
Creation parameters
Index rollover
Feature description
Currently, you can switch to the JSON mode by clicking Change to JSON mode in the top-right corner of Index configuration to create an index. After a successful switch, the configuration information will be automatically synced to the UI in the corresponding mode.
Description of common parameters
The autonomous index feature provides options and policies to help you quickly configure rolling update and lifecycle management. It is compatible with the native syntax of Elasticsearch settings and mappings. Common parameters are as described below:
Type | Parameter | Description | Instructions |
---|---|---|---|
settings | index.number_of_shards | Number of primary shards | It is of the numeric type and must be an integer greater than or equal to 1. |
index.number_of_replicas | Number of replicas | It is of the numeric type and must be an integer greater than or equal to 0. | |
index.refresh_interval | Refresh interval | It is of the string type. The unit can be set to `d` (day), `h` (hour), `m` (minute), `s` (second), `ms` (millisecond). `micros` (microsecond), or `nanos` (nanosecond). For example, `30s` indicates to set the refresh interval to 30 seconds. | |
mappings | field | Field name | It is of the string type, cannot contain Chinese characters, and must be unique. |
type | Field type | It is of the string type and can be set to `boolean`, `keyword`, `long`, `double`, `date`, or `text`. For more information, see Field data types | |
analyzer | Analyzer | It is of the string type and can be an analyzer in the ES cluster, such as `ik_max_word`. | |
index | Index status | It is of the boolean type and can be set to `true` or `false`. | |
doc_values | Statistics status | It is of the boolean type and can be set to `true` or `false`. | |
options | pre_create.enable | Index precreation | It is of the boolean type and can be set to `true` (default) or `false`. Note that if it is disabled when the write mode is **Append write**, backing indices will not be rolled over based on the specified rollover cycle. |
rollover.dynamic | Rollover cycle dynamic adjustment | It is of the boolean type and can be set to `true` or `false`. | |
rollover.max_age | Rollover cycle | It is of the string type. The unit can be set to `d` (day) or `h` (hour). For example, `1d` indicates to set the rollover cycle to one day. | |
shard_num.dynamic | Shard quantity dynamic adjustment | It is of the boolean type and can be set to `true` or `false`. | |
write_mode | Write mode | It is of the string type. `append_only` indicates `Append write`, and `time_partition` indicates `Shard-based write by time`. | |
expire.max_age | Max age for deletion upon expiry | It is of the string type. The unit can be set to `d` (day) or `h` (hour). For example, `1d` indicates to set the max age to one day. | |
expire.max_size | Max size for deletion upon expiry | It is of the string type. The unit can be set to `PB`, `TB`, `GB`, `MB`, `KB` or `B`. For example, `1TB` indicates to set the max size to 1 TB. | |
policy | warm.actions.migrate | Index migration settings for the warm phase | See Migrate |
warm.min_age | Storage period before migration to the warm tier | It is of the string type. The unit can be set to `d` (day) or `h` (hour). For example, `1d` indicates to migrate the index to the warm tier one day after the start of the index rolling update. | |
cold.actions.migrate | Index migration settings for the cold phase | See Migrate | |
cold.min_age | Storage period before migration to the cold tier | It is of the string type. The unit can be set to `d` (day) or `h` (hour). For example, `1d` indicates to migrate the index to the cold tier one day after the start of the index rolling update. |
Click Confirm. After the index is created successfully, you will be redirected to the index list in which the index is included.
Data management allows you to redirect to the index search and analysis page. For more information, see Index Search and Analysis.
Data management allows you to view the index information and manage backing indices in the console. For more information, see Basic Index Information.
Data management provides a rich set of index monitoring metrics to help you view the real-time data of indices during use. For more information, see Index Monitoring.
Data management enables you to flexibly modify the index configuration information in the console in response to business changes. After successful modification, lifecycle configurations will apply to all backing indices, and configurations of other items will take effect only in those rolled over later and will not update existing ones. For more information, see Index Configuration Management.
Was this page helpful?