All Products
Search
Document Center

OpenSearch:ModifyTable

Last Updated:Nov 05, 2025

Modifies an index table.

Operation description

Method

PUT

URI

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

searchengine:ModifyTable

update

*Instance

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

None None

Request syntax

PUT /openapi/ha3/instances/{instanceId}/tables/{tableName} HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The instance ID.

ha-cn-pl32rf0****

tableName

string

Yes

The name of the index table.

index_hdfs

dryRun

boolean

No

Specifies whether to perform a dry run. A dry run checks if the data source is valid. Valid values: true and false.

true

body

object

No

The request body.

partitionCount

integer

No

The number of data shards.

1

dataSource

object

No

The data source configuration.

dataTimeSec

integer

No

The UNIX timestamp for incremental data.

1715160176

autoBuildIndex

boolean

No

Specifies whether to automatically rebuild the index.

true

config

object

No

The data source configuration.

endpoint

string

No

The endpoint.

http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api

accessKey

string

No

The AccessKey ID of the MaxCompute data source.

L***p

accessSecret

string

No

The AccessKey secret of the MaxCompute data source.

5**9a6

project

string

No

The name of the MaxCompute project.

test_project

partition

string

No

The partition information.

ds=20231220

table

string

No

The name of the table in the MaxCompute or Data Lake Formation (DLF) data source.

behavior

ossPath

string

No

The path of the file in OSS.

/opensearch/test.txt

bucket

string

No

The OSS bucket.

test_bucket

catalog

string

No

The name of the data catalog in the DLF data source.

test_catalog

database

string

No

The database in the DLF data source.

opensearch_db

tag

string

No

The tag for the DLF data source.

test

tableFormat

string

No

The table format for the DLF data source.

paimon lance object

path

string

No

The relative path.

/test

format

string

No

The file format.

ha3 json

rawSchema

string

No

The raw schema. If specified, this schema is used directly as the schema structure, and the system does not build one.

{}

primaryKey

string

No

The primary key field.

id

fieldSchema

object

No

A map of fields.

string

No

The key is the field name and the value is the field type.

{ "id": "INT64", "source_image": "STRING", "namespace": "INT64", "source_image_vector": "MULTI_FLOAT" }

vectorIndex

array

No

The index schema.

array<object>

No

The details of the index schema.

indexName

string

No

The name of the index schema.

test_index

vectorField

string

No

The vector field.

source_image_vector

sparseIndexField

string

No

The field for the indexes of a sparse vector.

sparse_indices

sparseValueField

string

No

The field for the values of a sparse vector.

sparse_values

dimension

string

No

The vector dimensions.

128

vectorIndexType

string

No

The vector index algorithm.

Qc

distanceType

string

No

The distance type.

SquaredEuclidean

namespace

string

No

The namespace field.

namespace

advanceParams

object

No

The index schema configuration.

buildIndexParams

string

No

The index building parameters.

{}

searchIndexParams

string

No

The index retrieval parameters.

{}

minScanDocCnt

string

No

The minimum number of documents to retrieve for the candidate set.

20000

linearBuildThreshold

string

No

The threshold for linear building.

5000

dataProcessConfig

array

No

The field processing configuration.

array<object>

No

The details of the field processing configuration.

operator

string

No

The method for processing the field. Valid values: `copy`: copies the source field to the destination field. `vectorize`: converts the source field into a vector using a model and stores the vector in the destination field.

vectorize

dstField

string

No

The destination field.

source_image_vector

srcField

string

No

The source field.

source_image

params

object

No

The model configuration.

vectorModel

string

No

The vectorization model.

clip

vectorModal

string

No

The data type.

image

srcFieldConfig

object

No

The source of the vectorization information.

ossEndpoint

string

No

The OSS region endpoint.

oss-cn-hangzhou-internal.aliyuncs.com

ossBucket

string

No

The name of the OSS bucket.

test-bucket

uid

string

No

The ID of the Alibaba Cloud account.

1062017779051424

Request example



PUT /openapi/ha3/instances/{instanceId}/tables/{tableName}



Important This example includes only the required parameters. For more information about other parameters, see the Request parameters section.

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

For more information, see Response structure.

Response elements

Element

Type

Description

Example

object

requestId

string

The request ID.

FE03180A-0E29-5474-8A86-33F0683294A4

result

object

The result of the request.

{}

Examples

Success response

JSON format

{
  "requestId": "FE03180A-0E29-5474-8A86-33F0683294A4",
  "result": {}
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.