Creates an index.
Operation description
Debugging
Authorization information
Request syntax
POST /openapi/ha3/instances/{instanceId}/indexes
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
instanceId | string | Yes | The instance ID. | ha-cn-2r42ppr7901 |
body | object | No | The request body. | |
name | string | No | The index name. | ha-cn-zvp2qr1sk01_qrs |
dataSource | string | No | The name of the data source. | test1 |
domain | string | No | The data center in which the data source is deployed. | vpc_hz_domain_1 |
content | string | No | The index schema. | {\"summarys\":{\"summary_fields\":[\"id\"]},\"indexs\":[{\"index_name\":\"index_id\",\"index_type\":\"PRIMARYKEY64\",\"index_fields\":\"id\",\"has_primary_key_attribute\":true,\"is_primary_key_sorted\":false}],\"attributes\":[\"id\"],\"fields\":[{\"field_name\":\"id\",\"field_type\":\"UINT16\"}],\"table_name\":\"index_2\"} |
partition | integer | No | The number of data shards. | 20211202 |
dataSourceInfo | object | No | The information about the data source. This parameter is required for an OpenSearch Vector Search Edition instance of the new version. | |
dataTimeSec | integer | No | The start timestamp from which incremental data is retrieved. | 1709715164 |
processPartitionCount | integer | No | The number of resources used for data update. | 4 |
name | string | No | The name of the data source. | ha-cn-35t3n1yuj0d_index_1 |
type | string | No | The type of the data source. Valid values:
| odps |
domain | string | No | The data center in which the data source is deployed. | vpc_hz_domain_1 |
config | object | No | The information about the MaxCompute data source. | |
endpoint | string | No | The endpoint of the MaxCompute or Object Storage Service (OSS) data source. | https://oss-cn-hangzhou.aliyuncs.com |
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 that is used as the data source. | bbt_algo_pai |
partition | string | No | The partition in the MaxCompute table. This parameter is required if type is set to odps. | ds=20230114 |
table | string | No | The table name. | bbt_rec_swing_u2i2i_score_be_v1 |
namespace | string | No | The namespace name. | test-namespace |
path | string | No | The path of the Apsara File Storage for HDFS data source. | test-hdfs-path |
ossPath | string | No | The path of the OSS object. | /opensearch/oss.json |
bucket | string | No | The name of the OSS bucket. | test-bucket |
saroConfig | object | No | The configurations of the SARO data source. | |
namespace | string | No | The namespace of the SARO data source. | flink-test-fjx-default |
tableName | string | No | The name of the SARO table. | device_event_shy_summary_ |
autoBuildIndex | boolean | No | Specifies whether to enable automatic full indexing. | true |
processParallelNum | integer | No | The maximum number of full indexes that can be concurrently processed. | 2 |
extend | object | No | The extended content of the field configuration. key specifies the vector field and the field that requires embedding. | { "vector": [ "source_image_vector" ], "embeding": [ "source_image" ], "description": [] } |
buildParallelNum | integer | No | The maximum number of full indexes that can be concurrently built. | 2 |
mergeParallelNum | integer | No | The maximum number of full indexes that can be concurrently merged. | 2 |
dryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. The system only checks the validity of the data source. Valid values:
| true |
Response parameters
Sample responses
Success responses
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {}
}
For more information, see Response struct.
Examples
Sample success responses
JSON
format
{
"requestId": "407BFD91-DE7D-50BA-8F88-CDE52A3B5E46",
"result": {}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-16 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-03-06 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-07-20 | The request parameters of the API has changed | View Change Details |
2022-01-12 | Add Operation | View Change Details |