全部產品
Search
文件中心

OpenSearch:ModifyTable

更新時間:Jun 26, 2026

修改索引表。

介面說明

方法

PUT

URI

/openapi/ha3/instances/{instanceId}/tables/{tableName}
```。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

searchengine:ModifyTable

update

*Instance

acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

請求文法

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": {}
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情