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 | Statistical field value maximum length defaults to 2048 bytes, and can be set between 64 and 1048576 bytes. tip
|
EnableAutoIndex | Boolean | No | true | Enable automatic index updates. When enabled, the system will automatically add new 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, choose whether to split the Chinese content in logs according to 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 name for key-value index configuration. Up to 100 fields can be added.
tip For subfields of key-value index with JSON type, use a dot (.) to indicate the hierarchy between JSON fields. For example, if the JSON field "namelist" includes a text-type subfield "totalcount" and a JSON-type subfield "info," and "info" contains a field "name," configure the field names as "totalcount" and "info.name" respectively. |
Value | Yes | "Value": { "ValueType": "text", "Delimiter": "", "CaseSensitive": true, "IncludeChinese": false, "SqlFlag": false } | Provide a description for the field to configure key-value index. |
Parameters | Type | Required | Example value | Description |
Parameters | Type | Required | Example value | Description |
SqlFlag | Boolean | No | false | Whether to enable analysis for this field. The default value is false. After enabling statistical analysis, you can configure delimiters and support contains Chinese. |
IndexAll | Boolean | No | false | Create indexes for all fields with textual values in the JSON fields. |
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 use the JsonKeys field to configure key-value indexing for JSON subfields, with its value as an array of KeyValueInfo
| |
Delimiter | String | No | , ;/\n\t | Delimiter for the field. Default is empty ("").
|
ValueType | String | Yes | text | Field type.
|
CaseSensitive | Boolean | No | true | Indicates whether case sensitivity is enabled. 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 this index was automatically added.
|
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. | Invalid parameter. |
400 | InvalidArgument | At least one of full-text indexing and key-value indexing must be turned on. | You need to enable at least one of full-text index or key-value index |
400 | InvalidArgument | Index key value_type:%s conflict with [includeChinese:%t, casSensitive:%t, delimiter:%s], please check argument. | Long/double types do not support Contains Chinese, Case sensitive, or Delimiter configuration. |
400 | InvalidIndexJsonKeys | Non-JSON field %s configures JsonKeys, please check argument. | Not a JSON field configuration sub-field. |
400 | ConflictIndexJsonKeys | JsonKeys %s and %s have conflict prefix, please check argument. | JsonKeys key name has a prefix conflict. |
400 | InvalidArgument | Index key sqlFlag:%t conflict with [includeChinese:%t, delimiter:%s], please check argument. | After enabling statistics, you cannot configure Contains Chinese or Delimiter settings. |
400 | IndexKeyValueQuotaExceed | Exceeded index key-value quota. | Exceeded key-value index quota. |
400 | IndexKeyDuplicate | The %dth index key name:%s is duplicate, please check argument. | Index key name is duplicated. |
400 | InvalidArgument | Index key delimiter:%s conflict with includeChinese:%t, please check argument. | Delimiter and Chinese word segmentation cannot be configured at the same time. |
400 | IndexKVNULL | Index key value index is open, but the key value list is null, please check argument. | The number of keys configured 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 | Cannot set reserved field index for the %v field. |
400 | IndexInnerKeyConflict | full-text indexing and content indexing can't be set together | There is a conflict between full-text index and __content__ index configuration. |