Creates an index.
Operation description
Method
POST
URI
/openapi/ha3/instances/{instanceId}/indexes
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:CreateIndex |
create |
*Instance
|
None | 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-2r42ppr**** |
| body |
object |
No |
The request body. |
{} |
| name |
string |
No |
The name of the index. |
index_1 |
| dataSource |
string |
No |
The name of the data source. |
ha-cn-35t3n1y****_index_1 |
| domain |
string |
No |
The data center of the data source. |
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. |
2 |
| dataSourceInfo |
object |
No |
Information about the data source. This parameter is required for new versions of Vector Search Edition. |
|
| dataTimeSec |
integer |
No |
The UNIX timestamp for incremental data. |
1709715164 |
| processPartitionCount |
integer |
No |
The number of resources for data updates. |
4 |
| name |
string |
No |
The name of the data source. |
ha-cn-35t3n1y****_index_1 |
| type |
string |
No |
The type of the data source. Valid values:
|
odps |
| domain |
string |
No |
The offline data center. |
vpc_hz_domain_1 |
| config |
object |
No |
ODPS-related configurations. |
|
| endpoint |
string |
No |
The endpoint of the ODPS or OSS data source. |
https://oss-cn-hangzhou.aliyuncs.com |
| accessKey |
string |
No |
The AccessKey ID of the ODPS data source. |
L***p |
| accessSecret |
string |
No |
The AccessKey secret of the ODPS data source. |
5**9a6 |
| project |
string |
No |
The name of the ODPS project. |
bbt_algo_pai |
| partition |
string |
No |
This parameter is required if the data source type is ODPS. |
ds=20230114 |
| table |
string |
No |
The name of the table. |
bbt_rec_swing_u2i2i_score_be_v1 |
| namespace |
string |
No |
The namespace. |
test-namespace |
| path |
string |
No |
The path of the HDFS data source. |
test-hdfs-path |
| ossPath |
string |
No |
The path of the OSS file. |
/opensearch/oss.json |
| bucket |
string |
No |
The OSS bucket. |
test-bucket |
| format |
string |
No |
The format of the OSS file.
|
ha3 |
| catalog |
string |
No |
The data catalog ID of the DLF data source. |
test-catalog |
| database |
string |
No |
The database of the DLF data source. |
test-database |
| tag |
string |
No |
The tag of the DLF data source. |
test-tag |
| tableFormat |
string |
No |
The table format of the DLF data source. |
paimon lance object |
| saroConfig |
object |
No |
The configuration of the Saro data source. |
|
| namespace |
string |
No |
The namespace of the Saro data source. This feature is available only for internal use. |
test |
| tableName |
string |
No |
The name of the Saro data table. This feature is available only for internal use. |
tableA |
| autoBuildIndex |
boolean |
No |
Specifies whether to automatically trigger a full indexing. |
true |
| processParallelNum |
integer |
No |
The concurrency for full data processing. |
2 |
| scene |
string |
No |
The template type. |
videoSearcher |
| extend |
object |
No |
The extended field configuration.
|
{ "vector": [ "source_image_vector" ], "embeding": [ "source_image" ], "description": [] } |
| buildParallelNum |
integer |
No |
The concurrency for full index building. |
2 |
| mergeParallelNum |
integer |
No |
The concurrency for full index merging. |
2 |
| dryRun |
boolean |
No |
Specifies whether to perform a dry run. A dry run only checks whether the data source is valid. Valid values:
|
true |
Request example
POST /openapi/ha3/instances/ose-test1/indexes
{
"name": "index_1",
"dataSource": "ha-cn-3********0d_index_1",
"content": "",
"extend":
{
"vector":
[
"source_image_vector"
],
"embeding":
[
"source_image"
],
"description":
[]
},
"partition": 1,
"dataSourceInfo":
{
"type": "odps",
"processPartitionCount": 2,
"autoBuildIndex": true,
"config":
{
"endpoint": "http://service.cn-hangzhou.maxcompute.aliyun.com/api",
"project": "odps_project",
"accessKey": "ak",
"accessSecret": "as",
"table": "odps_table",
"partition": "ds=*******"
},
"saroConfig":
{},
"dataTimeSec": 1709715164
}
}
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response that is returned. |
||
| requestId |
string |
The request ID. |
407BFD91-DE7D-50BA-8F88-CDE52A3B5E46 |
| result |
object |
The result of the request. |
{} |
Response example
Successful response
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {}
}
For more information, see Response structure.
Examples
Success response
JSON format
{
"requestId": "407BFD91-DE7D-50BA-8F88-CDE52A3B5E46",
"result": {}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.