更新时间:2020-07-14 22:25
创建一个查询分析规则。
当 dryRun=true 时,表示进行查询分析规则校验,默认 dryRun 不传为 false.
POST
/v4/openapi/app-groups/[appGroupIdentity]/apps/[appId]/query-processors?dryRun=true|false
字段 | 类型 | 是否必要 | 示例值 | 描述 |
---|---|---|---|---|
appGroupIdentity | String | 是 | “my_app_group_name” | 应用名称 |
appId | String | 是 | “110157886” | 版本号 |
字段 | 类型 | 是否必要 | 示例值 | 描述 |
---|---|---|---|---|
dryRun | Boolean | 否 | true | 是否为空运行请求 |
字段 | 类型 | 是否必要 | 示例值 | 描述 |
---|---|---|---|---|
name | String | 是 | “test” | 规则名称 |
processors[] | Object | 是 | 分析规则 参考:Processor |
|
domain | String | 否 | “GENERAL” | 行业类型 - GENERAL 通用行业 - ECOMMERCE 电商 - IT_CONTENT IT行业 |
indexes | Array | 否 | [“default”] | 应用的索引范围 |
active | Boolean | 否 | true | 是否设置为有效 |
字段 | 类型 | 描述 |
---|---|---|
requestId | String | 请求ID |
result | Object | 规则信息 参考:QueryProcessor |
POST /v4/openapi/app-groups/os_function_test_v1/apps/110157886/query-processors
{
"name": "query_filter",
"domain": "GENERAL",
"indexes": ["default"],
"processors": [
{
"name": "synonym",
"useSystemDictionary": true
},
{
"name": "stop_word",
"useSystemDictionary": true,
"interventionDictionary": "helo"
}
]
}
正确返回
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {
"name": "query_filter",
"active": true,
"indexes": [
"default"
],
"processors": [
{
"name": "synonym",
"useSystemDictionary": true
},
{
"name": "stop_word",
"useSystemDictionary": true,
"interventionDictionary": 980
}
],
"domain": "GENERAL",
"created": 1587398402,
"updated": 1587398402
}
}
错误返回
参考:响应结构
在文档使用中是否遇到以下问题
更多建议
匿名提交