修改索引表。
介面說明
方法
PUT
URI
/openapi/ha3/instances/{instanceId}/tables/{tableName}
```。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
searchengine:ModifyTable |
update |
*Instance
|
無 | 無 |
請求文法
PUT /openapi/ha3/instances/{instanceId}/tables/{tableName} HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| instanceId |
string |
是 |
執行個體 ID。 |
ha-cn-pl32rf0**** |
| tableName |
string |
是 |
索引表名稱。 |
index_hdfs |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| dryRun |
boolean |
否 |
是否 dryRun 建立(僅校驗資料來源是否合法)。取值:-true 是 -false 否。 |
true |
| body |
object |
否 |
請求體參數。 |
|
| partitionCount |
integer |
否 |
資料分片數。 |
1 |
| dataSource |
object |
否 |
資料來源配置。 |
|
| dataTimeSec |
integer |
否 |
追增量時間戳。 |
1715160176 |
| autoBuildIndex |
boolean |
否 |
是否自動索引重建。 |
true |
| config |
object |
否 |
資料來源配置。 |
|
| endpoint |
string |
否 |
存取網域名稱。 |
http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api |
| accessKey |
string |
否 |
odps 資料來源 ak。 |
L***p |
| accessSecret |
string |
否 |
odps 資料來源 ak secret。 |
5**9a6 |
| project |
string |
否 |
odps 資料來源專案名稱。 |
test_project |
| partition |
string |
否 |
分區資訊。 |
ds=20231220 |
| table |
string |
否 |
odps、dlf 資料來源表名。 |
behavior |
| ossPath |
string |
否 |
oss 檔案路徑。 |
/opensearch/test.txt |
| bucket |
string |
否 |
oss bucket |
test_bucket |
| catalog |
string |
否 |
dlf 資料來源-資料目錄名稱。 |
test_catalog |
| database |
string |
否 |
dlf 資料來源-資料庫。 |
opensearch_db |
| tag |
string |
否 |
dlf 資料來源-tag。 |
test |
| tableFormat |
string |
否 |
dlf 資料來源-表格式。 |
paimon lance object |
| path |
string |
否 |
相對路徑。 |
/test |
| format |
string |
否 |
檔案格式類型。 |
ha3 json |
| rawSchema |
string |
否 |
如果使用者傳了 rawSchema,則直接使用 rawSchema 作為 ha3 schema 結構,不用手動拼裝。 |
{} |
| primaryKey |
string |
否 |
主鍵欄位。 |
id |
| fieldSchema |
object |
否 |
欄位 map 集合。 |
|
|
string |
否 |
key: 字段名 value: 字段类型 |
{ "id": "INT64", "source_image": "STRING", "namespace": "INT64", "source_image_vector": "MULTI_FLOAT" } |
|
| vectorIndex |
array<object> |
否 |
索引結構。 |
|
|
array<object> |
否 |
索引結構詳細資訊。 |
||
| indexName |
string |
否 |
索引結構名稱。 |
test_index |
| vectorField |
string |
否 |
向量欄位。 |
source_image_vector |
| sparseIndexField |
string |
否 |
稀疏向量下標欄位。 |
sparse_indices |
| sparseValueField |
string |
否 |
稀疏向量值欄位。 |
sparse_values |
| dimension |
string |
否 |
向量維度。 |
128 |
| vectorIndexType |
string |
否 |
向量索引演算法。 |
Qc |
| distanceType |
string |
否 |
距離類型。 |
SquaredEuclidean |
| namespace |
string |
否 |
命名空間欄位。 |
namespace |
| advanceParams |
object |
否 |
索引結構配置。 |
|
| buildIndexParams |
string |
否 |
索引建構參數。 |
{} |
| searchIndexParams |
string |
否 |
索引檢索參數。 |
{} |
| minScanDocCnt |
string |
否 |
召回候選集的個數最小值。 |
20000 |
| linearBuildThreshold |
string |
否 |
線性建構的閾值。 |
5000 |
| dataProcessConfig |
array<object> |
否 |
欄位處理配置。 |
|
|
array<object> |
否 |
欄位處理配置詳細資訊。 |
||
| operator |
string |
否 |
欄位處理方式(copy:將來源欄位複製至目標欄位,vectorize:使用模型對來源欄位進行向量化,向量儲存在目標欄位中)。 |
vectorize |
| dstField |
string |
否 |
目標欄位。 |
source_image_vector |
| srcField |
string |
否 |
來源欄位。 |
source_image |
| params |
object |
否 |
配置模型資訊。 |
|
| vectorModel |
string |
否 |
向量化模型。 |
clip |
| vectorModal |
string |
否 |
資料類型。 |
image |
| srcFieldConfig |
object |
否 |
向量化資訊來源。 |
|
| ossEndpoint |
string |
否 |
OSS 區域位址。 |
oss-cn-hangzhou-internal.aliyuncs.com |
| ossBucket |
string |
否 |
OSS Bucket 名稱。 |
test-bucket |
| uid |
string |
否 |
雲端帳號 ID。 |
1062017779051424 |
請求範例
PUT /openapi/ha3/instances/{instanceId}/tables/{tableName}
{
"partitionCount": 1,
"primaryKey": "id",
"fieldSchema": {
"id": "INT64",
"source_image": "STRING",
"namespace": "STRING",
"source_image_vector": "MULTI_FLOAT"
},
"vectorIndex": [
{
"indexName": "test_index_1",
"vectorField": "source_image_vector",
"vectorIndexType": "HNSW",
"dimension": "512",
"distanceType": "InnerProduct"
}
]
}
詳情可參考回應結構。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| requestId |
string |
請求 ID。 |
FE03180A-0E29-5474-8A86-33F0683294A4 |
| result |
object |
傳回結果。 |
{} |
樣本
正常返回樣本
JSON格式
{
"requestId": "FE03180A-0E29-5474-8A86-33F0683294A4",
"result": {}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。