查看一个 OpenSearch 应用版本详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
opensearch:DescribeApp |
get |
*App
|
无 | 无 |
请求语法
GET /v4/openapi/app-groups/{appGroupIdentity}/apps/{appId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| appGroupIdentity |
string |
是 |
应用名称 |
my_app_group_name |
| appId |
integer |
是 |
版本 ID |
110116134 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应体 |
{} |
|
| requestId |
string |
请求 ID |
33477D76-C380-1D84-A4AD-043F52876CB1 |
| result |
object |
版本信息 |
{} |
| id |
string |
版本 ID |
100303063 |
| isCurrent |
boolean |
是否是在线版本。 |
True |
| clusterName |
string |
集群名称 |
- |
| autoSwitch |
boolean |
是否自动切换 |
true |
| type |
string |
版本类型
|
enhanced |
| description |
string |
版本描述 |
- |
| status |
string |
版本状态
|
ok |
| realtimeShared |
boolean |
||
| schema |
object |
应用结构 |
{} |
| tables |
object |
表结构。 |
{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } } |
| indexes |
object |
索引结构 |
|
| filterFields |
array |
属性字段集合 |
|
|
string |
属性字段 |
id |
|
| searchFields |
object |
索引字段 |
{ "fields": ["title"], "analyzer": "chn_standard" } |
| routeField |
string |
一级分列字段名称 |
field1 |
| routeFieldValues |
array |
一级分列字段热点值 |
|
|
string |
一级分列字段热点值 |
routeFieldValues |
|
| secondRouteField |
string |
二级分列字段名称(当且仅当配置有 routeFieldValues 时生效,默认使用宽表主键) |
field2 |
| ttlField |
object |
文档清理配置 |
|
| name |
string |
文档清理字段 |
text1 |
| ttl |
integer |
存活时间(毫秒) |
1000 |
| indexSortConfig |
array<object> |
倒排索引配置 |
|
|
object |
倒排索引配置 |
||
| field |
string |
排序字段 |
field1 |
| direction |
string |
排序方式
|
DESC |
| name |
string |
宽表表名 |
test |
| progressPercent |
integer |
数据导入进度百分比(如 83 代表 83%) |
100 |
| fetchFields |
array |
默认展示字段 |
[] |
|
string |
默认展示字段 |
{} |
|
| quota |
object |
配额信息 |
{} |
| spec |
string |
规格
|
opensearch.share.common |
| qps |
integer |
搜索请求(单位:次/秒)(老计费模型使用) |
5 |
| docSize |
integer |
存储容量(单位:GB) |
1 |
| computeResource |
integer |
计算资源(单位:LCU) |
20 |
| domain |
object |
行业类型
|
GENERAL |
| category |
string |
类型-standard 标准版-advance 老高级版(新应用不支持此类型)-enhanced 新高级版 |
- |
| name |
string |
英文名称 |
test |
| functions |
object |
搜索结果 |
{} |
| service |
array |
各个功能说明 |
[] |
|
string |
功能 1 |
- |
|
| qp |
array |
布局信息 |
[] |
|
string |
信息 1 |
- |
|
| algo |
array |
算法结构 |
[] |
|
string |
结构 1 |
- |
|
| schemas |
array<object> |
多表应用结构 |
|
|
array<object> |
单表应用结构 |
||
| tables |
object |
表结构 |
{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } } |
| indexes |
object |
索引结构 |
|
| filterFields |
array |
属性字段集合 |
|
|
string |
属性字段 |
field1 |
|
| searchFields |
object |
索引字段 |
{ "fields": ["title"], "analyzer": "chn_standard" } |
| routeField |
string |
一级分列字段名称 |
field1 |
| routeFieldValues |
array |
一级分列字段热点值 |
|
|
string |
一级分列字段热点值 |
routeFieldValues |
|
| secondRouteField |
string |
二级分列字段名称(当且仅当配置有 routeFieldValues 时生效,默认使用宽表主键) |
field2 |
| ttlField |
object |
文档清理配置 |
|
| name |
string |
文档时间字段 |
fIeld1 |
| ttl |
integer |
存活时间(毫秒) |
1000 |
| indexSortConfig |
array<object> |
倒排索引配置 |
|
|
object |
倒排索引配置 |
||
| field |
string |
排序字段 |
fIeld1 |
| direction |
string |
排序方式
|
DESC |
| name |
string |
宽表表名 |
main |
| firstRanks |
array<object> |
粗排配置 |
|
|
object |
粗排配置 |
||
| type |
string |
表达式类型 STRUCT 结构化, 默认值- STRING 自定义公式 |
STRING |
| name |
string |
粗排名称 |
test |
| description |
string |
描述 |
Description |
| active |
boolean |
是否是默认表达式 |
False |
| meta |
any |
表达式信息(Array 或 String) |
String :"random()*100+now()"; Array: [ { "attribute": "static_bm25()", "arg": "", "weight": 10 } ] |
| secondRanks |
array<object> |
精排配置 |
|
|
object |
精排配置 |
||
| meta |
any |
精排表达式(可以编写包含字段、算分特征和数学函数的表达式,实现复杂的排序逻辑) |
"cate_id > 0 and cate_id < 1000" |
| name |
string |
精排名称 |
default |
| description |
string |
描述 |
描述 |
| active |
boolean |
是否是默认表达式 |
False |
| dataSources |
array<object> |
数据源配置 |
|
|
array<object> |
数据源配置 |
||
| tableName |
string |
应用表名 |
main |
| type |
string |
数据源类型
|
rds |
| fields |
array<object> |
表字段映射信息 |
|
|
object |
表字段映射信息 |
{ "id": "id" } |
|
| plugins |
object |
字段数据处理插件 插件名称(name)
插件参数(parameters):
|
{ "name": "JsonKeyValueExtractor", "parameters": { "key": "my_field" } } |
| keyField |
string |
主键 |
id |
| schemaName |
string |
宽表名称 |
name |
| parameters |
object |
数据源信息 |
{ "instanceId": "rds-instance-id", "dbName": "my_db", "dbTableName": "my_table", "dbUser": "my", "dbPassword": "my_passwd", "filter":"", "autoSync": true } |
| summaries |
array<object> |
搜索结果摘要配置 |
|
|
array<object> |
搜索结果摘要配置 |
||
| name |
string |
分组名 |
default |
| meta |
array<object> |
摘要配置 |
|
|
object |
摘要配置 |
||
| field |
string |
字段 |
field1 |
| len |
integer |
片段长度,取值区间:[1-300] |
50 |
| element |
string |
飘红标签 |
em |
| ellipsis |
string |
片段链接符 |
... |
| snippet |
string |
片段数量,取值区间:[1-5] |
5 |
| queryProcessors |
array<object> |
查询意图理解配置 |
|
|
array<object> |
查询意图理解配置 |
||
| name |
string |
规则名称 |
test |
| domain |
string |
行业类型
|
GENERAL |
| category |
string |
行业垂类 |
"" |
| processors |
array<object> |
包含功能 |
|
|
object |
包含功能 |
{ "name": "stop_word", "useSystemDictionary": true, "interventionDictionary": "my_dict", "ignoreSpace": true } |
|
| indexes |
array |
应用的索引范围 |
|
|
string |
应用索引 |
default |
|
| active |
boolean |
是否默认规则 |
False |
| cluster |
object |
能力开放配置 |
|
| maxTimeoutMS |
integer |
集群的超时时间,单位是 ms |
750 |
| maxQueryClauseLength |
integer |
query 字句最大长度 |
1024 |
| interpretations |
object |
LLM 字段模型 |
[ { "table": "table1", "fields": [ { "name": "field1", "interpretation": " title" }, { "name": "field2", "interpretation": " ID" } ] } ] |
| prompts |
array<object> |
LLM prompt 配置 |
{ "parameters" : [ { "name" : "docs", "value" : "The concatenation method for doc content. For example, the current qwen format: ' |
|
object |
prompt 配置 |
{ "parameters" : [ { "name" : "docs", "value" : "doc内容的拼接方式,比如现在的 qwen的 ' |
示例
正常返回示例
JSON格式
{
"requestId": "33477D76-C380-1D84-A4AD-043F52876CB1",
"result": {
"id": "100303063",
"isCurrent": true,
"clusterName": "-",
"autoSwitch": true,
"type": "enhanced",
"description": "-",
"status": "ok",
"realtimeShared": true,
"schema": {
"tables": {
"primaryTable": true,
"name": "main",
"fields": {
"id": {
"name": "id",
"type": "LITERAL",
"primaryKey": true
},
"title": {
"name": "title",
"type": "TEXT",
"primaryKey": false
},
"buy": {
"name": "buy",
"type": "INT",
"primaryKey": false
},
"cate_id": {
"name": "cate_id",
"type": "INT",
"primaryKey": false
},
"cate_name": {
"name": "cate_name",
"type": "LITERAL",
"primaryKey": false
}
}
},
"indexes": {
"filterFields": [
"id"
],
"searchFields": {
"fields": [
"title"
],
"analyzer": "chn_standard"
}
},
"routeField": "field1",
"routeFieldValues": [
"routeFieldValues"
],
"secondRouteField": "field2\n",
"ttlField": {
"name": "text1\n",
"ttl": 1000
},
"indexSortConfig": [
{
"field": "field1",
"direction": "DESC"
}
],
"name": "test"
},
"progressPercent": 100,
"fetchFields": [
"{}"
],
"quota": {
"spec": "opensearch.share.common",
"qps": 5,
"docSize": 1,
"computeResource": 20
},
"domain": {
"category": "-",
"name": "test",
"functions": {
"service": [
"-"
],
"qp": [
"-"
],
"algo": [
"-"
]
}
},
"schemas": [
{
"tables": {
"primaryTable": true,
"name": "main",
"fields": {
"id": {
"name": "id",
"type": "LITERAL",
"primaryKey": true
},
"title": {
"name": "title",
"type": "TEXT",
"primaryKey": false
},
"buy": {
"name": "buy",
"type": "INT",
"primaryKey": false
},
"cate_id": {
"name": "cate_id",
"type": "INT",
"primaryKey": false
},
"cate_name": {
"name": "cate_name",
"type": "LITERAL",
"primaryKey": false
}
}
},
"indexes": {
"filterFields": [
"field1"
],
"searchFields": {
"fields": [
"title"
],
"analyzer": "chn_standard"
}
},
"routeField": "field1\n",
"routeFieldValues": [
"routeFieldValues"
],
"secondRouteField": "field2",
"ttlField": {
"name": "fIeld1",
"ttl": 1000
},
"indexSortConfig": [
{
"field": "fIeld1",
"direction": "DESC"
}
],
"name": "main"
}
],
"firstRanks": [
{
"type": "STRING",
"name": "test",
"description": "Description",
"active": true,
"meta": "String :\"random()*100+now()\";\nArray: [\n {\n \"attribute\": \"static_bm25()\",\n \"arg\": \"\",\n \"weight\": 10\n }\n ]"
}
],
"secondRanks": [
{
"meta": "\"cate_id > 0 and cate_id < 1000\"\n",
"name": "default\n",
"description": "描述",
"active": true
}
],
"dataSources": [
{
"tableName": "main",
"type": "rds",
"fields": [
{
"id": "id"
}
],
"plugins": {
"name": "JsonKeyValueExtractor",
"parameters": {
"key": "my_field"
}
},
"keyField": "id",
"schemaName": "name",
"parameters": {
"instanceId": "rds-instance-id",
"dbName": "my_db",
"dbTableName": "my_table",
"dbUser": "my",
"dbPassword": "my_passwd",
"filter": "",
"autoSync": true
}
}
],
"summaries": [
{
"name": "default",
"meta": [
{
"field": "field1",
"len": 50,
"element": "em",
"ellipsis": "...",
"snippet": "5"
}
]
}
],
"queryProcessors": [
{
"name": "test",
"domain": "GENERAL",
"category": "\"\"",
"processors": [
{
"name": "stop_word",
"useSystemDictionary": true,
"interventionDictionary": "my_dict",
"ignoreSpace": true
}
],
"indexes": [
"default"
],
"active": true
}
],
"cluster": {
"maxTimeoutMS": 750,
"maxQueryClauseLength": 1024
},
"interpretations": {
"test": "test",
"test2": 1
},
"prompts": [
{
"parameters": [
{
"name": "docs",
"value": "doc内容的拼接方式,比如现在的 qwen的 '\n${doc}\n\n"
}
],
"messages": [
{
"role": "role_name,这里是否需要限定只能是 system, user, assistant,还是可以让用户随意填写",
"content": "用户设置的prompt内容,里面可以使用 ${parameter_key} 来表示期望动态替换的内容,具体替换规则参考下面说明"
}
]
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。