You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Index management API
DescribeIndex
Copy page
Download PDF
DescribeIndex
Call the DescribeIndex API to obtain index configuration details​
Usage instructions​
This API allows up to 20 calls per second. If you exceed this limit, an ExceedQPSLimit error will be returned​
Request instructions​
  • Request method: GET​
  • Request URL: https://{tls-endpoint}/DescribeIndex​
Request parameters​
The table below lists only the unique request parameters for this API, along with some common parameters For more information, see Common parameters​
Query​
​
Parameters​
Type​
Required​
Example value​
Description​
TopicId​
String​
Yes​
4a**********​
Log topic ID.​
​
Return parameters​
The table below lists only the return parameters specific to this API. For more information, see Return structure.​
​
Parameters​
Type​
Example value​
Description​
TopicId​
String​
4a**********​
Log topic ID.​
FullText​
Object of FullTextInfo​
/​
Full-text index configuration.​
tip​
This field may return null, indicating that the full-text index is not enabled.​
KeyValue​
Array of KeyValueInfo​
/​
Key-value index configuration.​
tip​
This field returns an array of length 0, indicating that key-value indexing is not enabled.​
UserInnerKeyValue​
Array of KeyValueInfo​
/​
Reserved field index configuration.​
tip​
This field returns an array with a length of 0, indicating that the reserved field index is not enabled.​
CreateTime​
String​
2021-08-19 11:41:29​
Time the index was created.​
ModifyTime​
String​
2021-08-19 11:41:29​
Time when the index was last modified.​
EnableAutoIndex​
Boolean​
true​
Enable automatic key-value index updates. When enabled, the system automatically adds new fields to the key-value index.​
  • true: enable automatic updates.​
  • false: do not enable automatic updates.​
MaxTextLen​
Integer​
2048​
Calculates the maximum field value length. The default is 2048 bytes; valid range is 64 to 1048576 bytes.​
tip​
  • If the length of a single field value exceeds the maximum length you specified, the excess part will be truncated and excluded from analysis​
  • After updating the maximum length for the field, the change only affects incremental data​
​
FullTextInfo​
​
Parameters​
Type​
Example value​
Description​
Delimiter​
String​
, ;/\n\t​
Delimiter for full-text index.​
CaseSensitive​
Boolean​
false​
Is case sensitive.​
  • true: Case sensitive.​
  • false: Not case sensitive.​
IncludeChinese​
Boolean​
false​
Contains Chinese.​
  • true: Contains Chinese.​
  • false: Does not contain Chinese.​
​
KeyValueInfo​
​
Parameters​
Type​
Example value​
Description​
Key​
String​
"Key": "test-key1"​
Name of the field for the key-value index.​
Value​
Object of Value​
"Value": { "ValueType": "text", "Delimiter": "", "CaseSensitive": true, "IncludeChinese": false, "SqlFlag": false }​
Description of the key-value index field.​
​
Value​
​
Parameters​
Type​
Example value​
Description​
SqlFlag​
Boolean​
false​
Enable field analysis​
  • true: Enabled​
  • false: Not enabled​
IndexAll​
Boolean​
false​
Determine whether to create an index for all fields with text values in the JSON field.​
  • true: Enabled.​
  • false: Unversioned.​
JsonKeys​
Array of KeyValueInfo​
[ { "Key":"key1", "Value":{ "ValueType":"text", "SqlFlag":true } }, { "Key":"key2", "Value":{ "ValueType":"long", "SqlFlag":true } }, { "Key":"key3.key4.key5", "Value":{ "ValueType":"double", "SqlFlag":true } } ]​
Returns the index of the JSON subfield, with values as an array of KeyValueInfo.​
Delimiter​
String​
, ;/\n\t​
Delimiter for the field​
ValueType​
String​
text​
Field types include long, double, text, and json.​
CaseSensitive​
Boolean​
true​
Case sensitive​
  • true: Case sensitive​
  • false: Not case sensitive​
IncludeChinese​
Boolean​
false​
Contains Chinese.​
  • true: contains Chinese.​
  • false: does not contain Chinese.​
Description​
String​
test​
Description information of the indexed fields.​
IndexSQLAll​
Boolean​
false​
Enable automatic indexing and statistics for JSON fields.​
  • true: Enable automatic indexing and statistics.​
  • false: Do not enable automatic indexing and statistics.​
AutoIndexFlag​
Boolean​
false​
Is the index automatically added?​
  • true: the index is added automatically.​
  • false: the index is not added automatically.​
​
Sample request 1​
​
GET https://{tls-endpoint}/DescribeIndex?TopicId=c1******** HTTP/1.1​
​
Sample response 1​
Configure only the full-text index​
​
{​
"TopicId": "396f23d6-27bd-48eb-85d8-ee693716****",​
"FullText": {​
"Delimiter": ",-;",​
"CaseSensitive": false,​
"IncludeChinese": false​
},​
"KeyValue": [],​
"UserInnerKeyValue": [],​
"CreateTime": "2022-02-28 21:36:14",​
"ModifyTime": "2022-02-28 21:36:15"​
}​
​
Sample request 2​
​
GET https://{tls-endpoint}/DescribeIndex?TopicId=c1******** HTTP/1.1​
Content-Type: application/json​
​
Sample response 2​
Configure only the field index​
​
Content-Type: application/json; charset=utf-8​
{​
"TopicId": "4a**********",​
"FullText": {​
"Delimiter": ", ;/\n\t",​
"CaseSensitive": false,​
"IncludeChinese": false​
},​
"KeyValue": [​
{​
"Key": "log_content",​
"Value": {​
"SqlFlag": false,​
"IndexAll": false,​
"JsonKeys": [],​
"Delimiter": ", ;/\n\t",​
"ValueType": "text",​
"IndexSQLAll": false,​
"AutoIndexFlag": false,​
"CaseSensitive": true,​
"Description": test,​
"IncludeChinese": false​
}​
},​
{​
"Key": "request_data",​
"Value": {​
"SqlFlag": true,​
"IndexAll": false,​
"JsonKeys": [​
{​
"Key": "request_data.request_id",​
"Value": {​
"SqlFlag": true,​
"IndexAll": false,​
"JsonKeys": [],​
"Delimiter": "",​
"ValueType": "long",​
"IndexSQLAll": false,​
"AutoIndexFlag": false,​
"CaseSensitive": false,​
"Description": test,​
"IncludeChinese": false​
}​
}​
],​
"Delimiter": "",​
"ValueType": "json",​
"IndexSQLAll": false,​
"AutoIndexFlag": false,​
"CaseSensitive": false,​
"IncludeChinese": false​
}​
}​
],​
"UserInnerKeyValue": [],​
"CreateTime": "2021-08-19 11:41:29",​
"ModifyTime": "2021-08-20 10:12:30",​
"EnableAutoIndex": true,​
"EnablePhraseIndex": false,​
"MaxTextLen": 2048​
}​
​
Error Code​
The table below lists error codes related to this API and its business logic. For common error codes, see the Common Error Codes documentation.​
​
HTTP status code​
Error Code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
Invalid parameter.​
404​
TopicNotExist​
Topic does not exist.​
Log topic does not exist.​
404​
IndexNotExist​
Index does not exist.​
Index configuration does not exist.​
500​
InternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error​
​
Last updated: 2026.07.08 15:45:25