建立一個 OpenSearch 應用程式版本。
介面說明
若已存在同名標準版應用程式,則建立新版本;
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
opensearch:CreateApp |
create |
*App
|
無 | 無 |
請求文法
POST /v4/openapi/app-groups/{appGroupIdentity}/apps HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| appGroupIdentity |
string |
是 |
應用程式名稱。 |
my_app_group_name |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| dryRun |
boolean |
否 |
是否 dryRun 建立(僅驗證資料來源是否合法)。取值:-true 是 -false 否。 |
true |
| body |
object |
否 |
請求 Body。 |
|
| autoSwitch |
boolean |
否 |
版本建立後是否自動切換為線上版本。 |
false |
| networkType |
string |
否 |
可用區識別碼。可選值: |
vpc |
| description |
string |
否 |
版本描述。 |
"version description" |
| 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 |
否 |
二級分列欄位名稱(當且僅當設定有 |
field2 |
| ttlField |
object |
否 |
文件清理設定。 |
|
| name |
string |
否 |
文檔時間欄位 |
text1 |
| ttl |
integer |
否 |
存活時間(毫秒) |
1000 |
| indexSortConfig |
array<object> |
否 |
倒排索引設定。 |
|
|
object |
否 |
倒排索引設定。 |
||
| field |
string |
否 |
排序欄位 |
field1 |
| direction |
string |
否 |
排序方式 |
ASC; DESC; |
| name |
string |
否 |
寬表資料表名稱。 |
table_name |
| 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 |
否 |
屬性欄位 |
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 |
否 |
寬表資料表名稱。 |
table_name |
| firstRanks |
array<object> |
否 |
粗排設定。 |
|
|
object |
否 |
粗排設定。 |
||
| type |
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": "JsonKeyValueExtractor", "parameters": { "key": "my_field" } } |
| keyField |
string |
否 |
主鍵。 |
id |
| schemaName |
string |
否 |
寬表名稱。 |
table_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] |
1 |
| fetchFields |
array |
否 |
預設顯示欄位。 |
|
|
string |
否 |
欄位。 |
field1 |
|
| queryProcessors |
array<object> |
否 |
查詢意圖理解設定。 |
|
|
array<object> |
否 |
查詢意圖理解設定。 |
||
| name |
string |
否 |
規則名稱。 |
name |
| domain |
string |
否 |
產業類型。 |
ECOMMERCE |
| category |
string |
否 |
產業垂直領域。 |
"" |
| processors |
array<object> |
否 |
包含功能。 |
|
|
object |
否 |
包含功能。 |
{ "name": "stop_word", "useSystemDictionary": true, "interventionDictionary": "my_dict", "ignoreSpace": true } |
|
| indexes |
array |
否 |
套用的索引範圍。 |
|
|
string |
否 |
套用索引。 |
default |
|
| active |
boolean |
否 |
是否為預設規則。 |
True |
| cluster |
object |
否 |
能力開放設定。 |
|
| maxTimeoutMS |
integer |
否 |
叢集的逾時時間,單位為 ms。 |
750 |
| maxQueryClauseLength |
integer |
否 |
query 子句最大長度。 |
1024 |
| textSparseEmbeddingModel |
string |
否 |
用於指定 LLM 應用程式版本使用的稀疏向量模型。 |
ops-text-sparse-embedding-001 |
| textEmbeddingModel |
string |
否 |
用於指定 LLM 應用程式版本使用的文字向量化模型。 |
ops-text-embedding-002 |
| chunkModels |
array<object> |
否 |
切片方式。 |
|
|
object |
否 |
切片方式設定項目。 |
||
| imageContentRecognizerModels |
array<object> |
否 |
圖片內容辨識的模型。 |
|
|
object |
否 |
圖片內容辨識的模型設定項目。 |
||
| graphRag |
object |
否 |
GraphRAG 整合設定。 |
|
| vectorIndexConfigs |
array<object> |
否 |
獨享型向量索引進階設定。 |
|
|
object |
否 |
獨享型向量索引進階設定項目。 |
||
| domain |
object |
否 |
產業模型。 |
|
| name |
string |
否 |
產業類型。 |
ecommerce |
| category |
string |
否 |
產業垂直領域。 |
general |
| functions |
object |
否 |
已選擇功能。 |
{"qp":["spellcheck"],"algo":["pop"],"service":["suggest"]} |
| realtimeShared |
boolean |
否 |
是否共用即時串流。 |
|
| interpretations |
array<object> |
否 |
LLM 表欄位描述。 |
|
|
object |
否 |
LLM 表欄位描述。 |
||
| prompts |
array<object> |
否 |
prompt 設定。 |
|
|
object |
否 |
請求體中第一個提示內容。 |
||
| configItems |
array<object> |
否 |
請求體中的設定項目清單。 |
|
|
object |
否 |
設定項目清單中的第一個元素。 |
請求主體
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
根節點或根目錄。 |
||
| requestId |
string |
請求 ID。 |
ABCDEFG |
| result |
object |
返回結果。 |
{} |
| id |
string |
應用程式 ID。 |
12888 |
| isCurrent |
boolean |
是否為線上版本。 |
12333 |
clusterName
deprecated
|
string |
叢集名稱。 |
vpc_sh_domain_1 |
| type |
string |
應用程式類型。 |
standard |
| description |
string |
應用程式描述。 |
My application |
| status |
string |
應用程式狀態。 |
OK |
| 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 |
二級分欄欄位名稱(若且唯若配置有 routeFieldValues 時生效,預設使用寬表主鍵) |
|
|
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 |
資料匯入進度百分比。 |
100 |
| fetchFields |
array |
預設顯示欄位集合。 |
|
|
string |
預設顯示欄位。 |
field1 |
|
| domain |
object |
產業模型。 |
|
| category |
string |
行業垂類 |
- |
| name |
string |
行業類型
|
GENERAL |
| functions |
object |
已選擇功能 |
|
| service |
array |
周邊服務類 |
|
|
string |
周邊服務類 |
suggest |
|
| qp |
array |
查詢分析類 |
|
|
string |
查詢分析類 |
spellcheck |
|
| algo |
array |
排序策略類 |
|
|
string |
排序策略類 |
pop |
|
| 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 |
描述 |
描述 |
| 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 |
描述 |
default |
| 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 |
寬表名稱 |
table_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 |
分組名 |
fefault |
| 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 |
應用索引 |
id |
|
| active |
boolean |
是否預設規則 |
False |
| cluster |
object |
能力開放設定。 |
|
| maxTimeoutMS |
integer |
叢集的逾時時間,單位是 ms |
750 |
| maxQueryClauseLength |
integer |
query 字句最大長度 |
1024 |
| textEmbeddingModel |
string |
||
| textSparseEmbeddingModel |
string |
||
| chunkModels |
array<object> |
||
|
object |
|||
| imageContentRecognizerModels |
array<object> |
||
|
object |
|||
| graphRag |
object |
||
| vectorIndexConfigs |
array<object> |
||
|
object |
|||
| prompts |
array<object> |
prompt 設定。 |
|
|
object |
prompt 設定。 |
{ |
|
| updated |
integer |
變更時間。 |
|
| created |
integer |
建立時間。 |
|
| switchTime |
integer |
切換上線時間。 |
|
| interpretations |
array<object> |
LLM 表欄位描述。 |
{ "name": "longyu_llm_1", "schemas": [], "interpretations": [ { "table": "table1", "fields": [ { "name": "field1", "interpretation": " title" }, { "name": "field2", "interpretation": " ID" } ] } ] } |
|
object |
LLM 表欄位描述。 |
||
| configItems |
array<object> |
設定項目清單。 |
|
|
object |
設定項目清單中的第一個元素。 |
樣本
正常返回樣本
JSON格式
{
"requestId": "ABCDEFG",
"result": {
"id": "12888",
"isCurrent": true,
"clusterName": "vpc_sh_domain_1",
"type": "standard",
"description": "My application",
"status": "OK",
"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": [
"field1"
],
"domain": {
"category": "-",
"name": "GENERAL",
"functions": {
"service": [
"suggest\n\n"
],
"qp": [
"spellcheck"
],
"algo": [
"pop"
]
}
},
"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": "描述",
"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": "default\n",
"active": true
}
],
"dataSources": [
{
"tableName": "main",
"type": "rds",
"fields": [
{
"id": "id"
}
],
"plugins": {
"name": "JsonKeyValueExtractor",
"parameters": {
"key": "my_field"
}
},
"keyField": "id",
"schemaName": "table_name",
"parameters": {
"instanceId": "rds-instance-id",
"dbName": "my_db",
"dbTableName": "my_table",
"dbUser": "my",
"dbPassword": "my_passwd",
"filter": "",
"autoSync": true
}
}
],
"summaries": [
{
"name": "fefault",
"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": [
"id"
],
"active": true
}
],
"cluster": {
"maxTimeoutMS": 750,
"maxQueryClauseLength": 1024,
"textEmbeddingModel": "",
"textSparseEmbeddingModel": "",
"chunkModels": [
{
"test": "test",
"test2": 1
}
],
"imageContentRecognizerModels": [
{
"test": "test",
"test2": 1
}
],
"graphRag": {
"test": "test",
"test2": 1
},
"vectorIndexConfigs": [
{
"test": "test",
"test2": 1
}
]
},
"prompts": [
{
"name": "prompt_name",
"isDefault": false,
"description": "描述",
"prompt": {
"parameters": [
{
"name": "docs",
"value": "doc内容的拼接方式,比如现在的 qwen的 '\n${doc}\n\n"
}
],
"messages": [
{
"role": "role_name,这里是否需要限定只能是 system, user, assistant,还是可以让用户随意填写",
"content": "用户设置的prompt内容,里面可以使用 ${parameter_key} 来表示期望动态替换的内容,具体替换规则参考下面说明"
}
]
}
}
],
"updated": 0,
"created": 0,
"switchTime": 0,
"interpretations": [
{
"test": "test",
"test2": 1
}
],
"configItems": [
{
"test": "test",
"test2": 1
}
]
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。