ModifyTable

更新时间:
复制 MD 格式

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

Path 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

Request parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

No

Specifies whether to perform a dry run (only validates whether the data source is valid). Valid values:

  • true: performs a dry run.

  • false: does not perform a dry run.

true

body

object

No

The request body parameters.

partitionCount

integer

No

The number of data shards.

1

dataSource

object

No

The datasource config.

dataTimeSec

integer

No

The timestamp for incremental data tracking.

1715160176

autoBuildIndex

boolean

No

Indicates whether auto index rebuilding is enabled.

true

config

object

No

The datasource config.

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 rawSchema is provided, it is used directly as the HA3 schema structure without manual assembly.

{}

primaryKey

string

No

The primary key field.

id

fieldSchema

object

No

The field map collection.

string

No

key: 字段名 value: 字段类型

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

vectorIndex

array<object>

No

The index structure.

array<object>

No

The details of the index structure.

indexName

string

No

The name of the index structure.

test_index

vectorField

string

No

The vector field.

source_image_vector

sparseIndexField

string

No

The subscript field of the sparse vector.

sparse_indices

sparseValueField

string

No

The value field of the 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 structure 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<object>

No

The field processing configuration.

array<object>

No

The details of the field processing configuration.

operator

string

No

The field processing method. Valid values:

  • copy: copies the source field to the destination field.

  • vectorize: vectorizes the source field by 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 information.

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 lists only the simplest parameters. For more custom parameters, refer to the request parameters.

{
    "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 struct.

Response elements

Element

Type

Description

Example

object

requestId

string

The request ID.

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

result

object

The returned result.

{}

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.