Updates the index information of a Logstore.
Operation description
Operation description
The Host consists of the project name and the Simple Log Service endpoint. You must specify the project in the Host.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:UpdateIndex |
update |
*LogStore
|
|
None |
Request syntax
PUT /logstores/{logstore}/index HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| logstore |
string |
Yes |
The Logstore name. |
test-logstore |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The project name. |
ali-test-project |
| body |
object |
No |
The request body. |
|
| keys |
object |
No |
The configuration of field indexes. A field index is a key-value pair in which the key specifies the name of the field and the value specifies the index configuration of the field. |
|
|
object |
Yes |
The index configuration of the field. |
||
| caseSensitive |
boolean |
No |
Specifies whether to enable case sensitivity. Valid values:
|
|
| chn |
boolean |
No |
Specifies whether to include Chinese characters. This parameter is required only when type is set to text. Valid values:
|
|
| type |
string |
No |
The data type of the field value. Valid values: text, json, double, and long. Valid values:
|
|
| alias |
string |
No |
The alias of the field. |
|
| token |
array |
Yes |
The delimiters that are used to split text. This parameter is required only when type is set to text. |
|
|
string |
No |
The delimiter that is used to split text. |
||
| doc_value |
boolean |
No |
Specifies whether to turn on Enable Analytics for the field. |
|
| line |
object |
No |
The configuration of full-text indexes. |
|
| chn |
boolean |
No |
Specifies whether to include Chinese characters. Valid values:
|
|
| caseSensitive |
boolean |
No |
Specifies whether to enable case sensitivity. Valid values:
|
|
| token |
array |
Yes |
The delimiters that are used to split text. |
|
|
string |
No |
The delimiter that is used to split text. |
||
| include_keys |
array |
No |
The included fields. You cannot specify both include_keys and exclude_keys. |
|
|
string |
No |
The included field. |
||
| exclude_keys |
array |
No |
The excluded fields. You cannot specify both include_keys and exclude_keys. |
|
|
string |
No |
The excluded field. |
||
| ttl |
integer |
No |
The retention period of data. Unit: days. Valid values: 7, 30, and 90. |
|
| max_text_len |
integer |
No |
The maximum length of a field value that can be retained. |
|
| log_reduce |
boolean |
No |
Specifies whether to turn on LogReduce. If you turn on LogReduce, only one of |
|
| log_reduce_white_list |
array |
No |
The fields in the whitelist that you want to use to cluster logs. |
|
|
string |
No |
The field in the whitelist. |
||
| log_reduce_black_list |
array |
No |
The fields in the blacklist that you want to use to cluster logs. |
|
|
string |
No |
The field in the blacklist. |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.