PUT /index HTTP/1.1Host: <Region>.cls.myqcloud.comAuthorization: <AuthorizationString>Content-Type: application/json{"topic_id": "xxxx-xx-xx-xx-xxxxxxxx","effective": true,"rule": {"full_text": {"case_sensitive": false,"tokenizer": "*{^&%"},"key_value": {"case_sensitive": false,"keys": ["age","name"],"types": ["long","text"],"tokenizers": ["", "-"],"sql_flags":[true,false]},"tag": {"case_sensitive": false,"keys": ["age","name"],"types": ["long","text"],"tokenizers": ["", "-"],"sql_flags":[true,false]}}}
PUT /index
Parameter | Type | Location | Required | Description |
topic_id | string | body | Yes | ID of the topic to which the index to be modified belongs |
effective | bool | body | Yes | Whether to enable the index |
rule | object | body | No | Index rule, which is required when effective is set to true. |
Parameter | Type | Location | Required | Description |
custom_uin | long | body | No | Customer UIN to which the index belongs |
rule:Parameter | Type | Required | Description |
full_text | object | No | Configuration for full-text index |
key_value | object | No | Configuration for key-value index |
full_text and key_value when setting rule.full_text:Parameter | Type | Required | Description |
case_sensitive | bool | Yes | Whether this parameter is case-sensitive |
tokenizer | string | No | Separator for full-text index, which cannot be empty. You’re recommended to set it to !@#%^&*()-_="', <>/?|\\;:\\n\\t\\r[]{}. |
key_value:Parameter | Type | Required | Description |
case_sensitive | bool | Yes | Whether this parameter is case-sensitive |
keys | array (string) | Yes | Key names for which indexes need to be created |
types | array (string) | Yes | Types of keys for which indexes need to be created. One type corresponds to one key. This is only applicable to parameters of long, double, or text type. |
tokenizers | array (string) | No | Separators for the above keys. One separator corresponds to one key. This parameter is only applicable to parameters of text type, and is empty for other types of parameters. |
sql_flags | array (bool) | No | An array of values indicating whether to enable SQL statistics for corresponding keys. Valid values: false (default): disable; true: enable |
tag:Parameter | Type | Required | Description |
case_sensitive | bool | Yes | Whether this parameter is case-sensitive |
keys | array (string) | Yes | Keys for which indexes need to be created |
types | array (string) | Yes | Types of the above keys. One type corresponds to one key. This is only applicable to parameters of long, double, or text type. |
tokenizers | array (string) | No | Separators for the above keys. One separator corresponds to one key. This parameter is only applicable to parameters of text type, and is empty for other types of parameters. |
sql_flags | array (bool) | No | An array of values indicating whether to enable SQL statistics for corresponding keys. Valid values: false (default): disable; true: enable |
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 0
Feedback