修改索引表。
接口说明
方法
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 |
否 |
索引结构 |
|
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 |
否 |
字段处理配置 |
|
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": {}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。