Creates an index table.
Operation description
Method
POST
URI
/openapi/ha3/instances/{instanceId}/tables
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:CreateTable |
create |
*Instance
|
None | None |
Request syntax
POST /openapi/ha3/instances/{instanceId}/tables HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
ha-cn-pl32rf0**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| dryRun |
boolean |
No |
Specifies whether to perform a dry run to check the validity of the data source. Valid values: `true` and `false`. |
true |
| body |
object |
No |
The request body. |
|
| name |
string |
No |
The index name. |
api_index_1 |
| dataProcessorCount |
integer |
No |
The number of resources for data updates. |
1 |
| partitionCount |
integer |
No |
The number of data shards. |
1 |
| dataSource |
object |
No |
The data source configuration. |
|
| type |
string |
No |
The type of the data source. Supported types include `odps`, `swift`, and `oss`. Valid values: `odps`, `swift`, `saro`, `oss`, and `unKnow`. |
odps |
| dataTimeSec |
integer |
No |
The 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 for the ODPS data source. |
L***p |
| accessSecret |
string |
No |
The AccessKey secret for the ODPS data source. |
5**9a6 |
| project |
string |
No |
The name of the project for the ODPS data source. |
test_project |
| partition |
string |
No |
This parameter is required when the data source type is `odps`. |
ds=20220713 |
| table |
string |
No |
The name of the table for the ODPS or DLF data source. |
test56 |
| path |
string |
No |
The relative path. |
/test |
| ossPath |
string |
No |
The path of the object in the OSS data source. |
/opensearch/test.txt |
| bucket |
string |
No |
The OSS bucket. |
test-bucket |
| catalog |
string |
No |
The name of the data catalog for the DLF data source. |
test_catalog |
| database |
string |
No |
The database of 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 |
| format |
string |
No |
The file format. |
ha3 json |
| rawSchema |
string |
No |
If `rawSchema` is specified, it is used directly as the HA3 schema structure. The system does not build a schema automatically. |
{} |
| primaryKey |
string |
No |
The primary key field. |
id |
| fieldSchema |
object |
No |
The schema of the fields. The key is the field name. |
|
|
string |
No |
A map structure. |
{ "id": "INT64", "source_image": "STRING", "namespace": "INT64", "source_image_vector": "MULTI_FLOAT" } |
|
| vectorIndex |
array |
No |
The index schema. |
|
|
array<object> |
No |
|||
| 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 sparse vector indices. |
sparse_indices |
| sparseValueField |
string |
No |
The field for sparse vector values. |
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 advanced configuration for the index schema. |
|
| buildIndexParams |
string |
No |
The parameters for building the index. |
{} |
| searchIndexParams |
string |
No |
The parameters for index retrieval. |
{} |
| minScanDocCnt |
string |
No |
The minimum number of documents to scan in a candidate set for retrieval. |
20000 |
| linearBuildThreshold |
string |
No |
The threshold for linear build. |
5000 |
| dataProcessConfig |
array |
No |
The field processing configuration. |
|
|
array<object> |
No |
The details of the field processing configuration. |
||
| operator |
string |
No |
The method for field processing. `copy`: Copies the source field to the destination field. `vectorize`: Vectorizes the source field 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 endpoint. |
oss-cn-hangzhou-internal.aliyuncs.com |
| ossBucket |
string |
No |
The OSS bucket. |
test-bucket |
| uid |
string |
No |
The ID of the Alibaba Cloud account. |
1062017779051424 |
| scene |
string |
No |
The template type. |
videoSearcher |
Request example
POST /openapi/ha3/instances/{instanceId}/tables
{
"name": "api",
"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. |
2AE63638-5420-56DC-BF59-37D8174039A0 |
| result |
object |
The returned result. |
{} |
Examples
Success response
JSON format
{
"requestId": "2AE63638-5420-56DC-BF59-37D8174039A0",
"result": {}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.