Torch Log Service
Parameters | Type | Required | Example value | Description |
Parameters | Type | Required | Example value | Description |
TopicId | String | Yes | 4a********* | Log topic ID. |
FullText | No | / | Full-text index configuration
| |
KeyValue | No | / | Key-value index configuration.
| |
UserInnerKeyValue | No | / | Reserved field index configuration.
| |
MaxTextLen | Integer | No | 2048 | Maximum length of field value for statistics. Default is 2048 bytes, with a range of 64–1048576 bytes. tip
|
EnableAutoIndex | Boolean | No | true | Enable automatic index updates. When enabled, the system will automatically add newly detected fields to the key-value index
|
Parameters | Type | Required | Example value | Description |
Parameters | Type | Required | Example value | Description |
Delimiter | String | Yes | , ;/\n\t | Delimiter for full-text index.
|
CaseSensitive | Boolean | Yes | false | Case sensitive.
|
IncludeChinese | Boolean | No | false | When querying, split the Chinese content of logs based on Chinese grammar. The default is false.
|
Parameters | Type | Required | Example value | Description |
Parameters | Type | Required | Example value | Description |
Key | String | Yes | "Key": "test-key1" | Specify the field names to be configured for the key-value index, with up to 100 fields allowed.
tip For subfields of JSON type key-value indexes, use a period (.) to indicate the hierarchy between JSON fields. For example, if the JSON field "namelist" contains a subfield "totalcount" of type text and another JSON type subfield "info," which in turn contains the field "name," the fields should be configured as "totalcount" and "info.name," respectively. |
Value | Yes | "Value": { "ValueType": "text", "Delimiter": "", "CaseSensitive": true, "IncludeChinese": false, "SqlFlag": false } | Description of fields that require key-value index configuration. |
Parameters | Type | Required | Example value | Description |
Parameters | Type | Required | Example value | Description |
SqlFlag | Boolean | No | false | Enable analysis for this field. The default value is false. After you enable statistics and analysis, you can configure delimiters and support for Contains Chinese. |
IndexAll | Boolean | No | false | Create an index for all fields containing text values in a JSON field. |
JsonKeys | No | [ { "Key":"key1", "Value":{ "ValueType":"text", "SqlFlag":true } }, { "Key":"key2", "Value":{ "ValueType":"long", "SqlFlag":true } }, { "Key":"key3.key4.key5", "Value":{ "ValueType":"double", "SqlFlag":true } } ] | When ValueType is set to json, you can configure JSON subfield key-value indexing through the JsonKeys field. Its value should be an array of KeyValueInfo objects.
| |
Delimiter | String | No | , ;/\n\t | The delimiter for the field. Default is empty ("").
|
ValueType | String | Yes | text | Field type.
|
CaseSensitive | Boolean | No | true | Case sensitivity. The default value is false. |
IncludeChinese | Boolean | No | false | When querying, TLS can split the Chinese content of logs according to Chinese grammar. You can choose to enable or disable this function.
|
Description | String | No | test | Description information of the indexed fields. |
IndexSQLAll | Boolean | No | false | Enable automatic indexing and statistics for JSON fields.
|
AutoIndexFlag | Boolean | No | false | Indicates whether the index is added automatically
|
Parameters | Type | Example value | Description |
Parameters | Type | Example value | Description |
TopicId | String | 3*********** | Log topic ID. |
HTTP status code | Error Code | Error message | Description |
HTTP status code | Error Code | Error message | Description |
400 | InvalidArgument | Invalid argument key %s, value %s, please check argument. | Delimiter and middle segmentation cannot be configured at the same time. |
400 | InvalidArgument | At least one of full-text indexing and key-value indexing must be turned on. | You must enable either the full-text index or the key-value index. |
400 | InvalidArgument | Index key value_type:%s conflict with [includeChinese:%t, casSensitive:%t, delimiter:%s], please check argument. | Configuration for long/double types does not support values that contain Chinese, are case sensitive, or include delimiter. |
400 | InvalidIndexJsonKeys | Non-JSON field %s configures JsonKeys, please check argument. | Non-JSON field configuration subfield |
400 | ConflictIndexJsonKeys | JsonKeys %s and %s have conflict prefix, please check argument. | There is a prefix conflict in JsonKeys key names |
400 | InvalidArgument | Index key sqlFlag:%t conflict with [includeChinese:%t, delimiter:%s], please check argument. | Once statistics are enabled, configuring content with Chinese characters or delimiters is not supported. |
400 | IndexKeyValueQuotaExceed | Exceeded index key-value quota. | Key-value index limit exceeded. |
400 | IndexKeyDuplicate | The %dth index key name:%s is duplicate, please check argument. | The index key name is duplicated. |
400 | InvalidArgument | Index key delimiter:%s conflict with includeChinese:%t, please check argument. | Delimiter and middle segmentation cannot be set together. |
400 | IndexKVNULL | Index key value index is open, but the key value list is null, please check argument. | The configured number of keys for the key-value index is 0. |
404 | TopicNotExist | Topic does not exist. | Log topic does not exist. |
409 | IndexAlreadyExist | Index already exist | The index already exists. |
500 | InternalServerError | We encountered an unexpected server error, please try again later. | Internal server error. |
400 | IndexInnerKeyUnSupport | key-value indexing for inner key: %v, doesn't support | Setting a reserved field index for the %v field is not supported. |
400 | IndexInnerKeyConflict | full-text indexing and content indexing can't be set together | There is a conflict between the full-text index and the __content__ index configuration. |