Creates an index.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
searchengine:CreateIndex | create |
|
| none |
Request syntax
POST /openapi/ha3/instances/{instanceId}/indexes HTTP/1.1
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 |