OpenSearch Vector Search Edition uses a 5-step wizard to create a table. When you select API as the data source type, data is pushed to the instance through API calls after the table is created.
Prerequisites
Before you begin, ensure that you have:
An OpenSearch Vector Search Edition instance
The vector model you plan to use, so you can supply the correct vector dimension, distance type, and index algorithm during configuration
Before you start: key decisions
Two settings in the wizard are difficult or impossible to change after the table is created. Review them before starting.
Data shards
All index tables in an OpenSearch instance must share the same shard count. The one exception: a single table can have one shard while all others share the same count. Decide on your shard topology before creating the first table.
Vector index parameters
The vector dimension, distance type, and index algorithm must match the model you use to generate embeddings. Check your model's documentation for the correct values:
| Parameter | Options | How to choose |
|---|---|---|
| Vector dimension | Any integer | Match your embedding model's output dimension |
| Distance type | SquareEuclidean, InnerProduct | Match your embedding model's similarity metric |
| Vector index algorithm | Qc, Linear, HNSW | Match your embedding model's recommended algorithm |
Create a table
Log on to the OpenSearch Vector Search Edition console. In the left-side navigation pane, click Instances. Find the target instance and click the instance name or ID. On the instance details page, click Table Management in the left-side pane, then click Add Table.

In the Basic table information step, configure the following parameters and click Next.

Parameter Description Table Name A custom name for the table. Data Shards The number of shards in the table. All index tables in an instance must share the same shard count, or one table can have one shard while all others share the same count. Number of Resources for Data UpdatesBilling overview of OpenSearch Vector Search Edition for the international site (alibabacloud.com) The compute resources allocated for data updates. Each instance includes a free quota of 2 resources per data source. Each resource provides 4 CPU cores and 8 GB of memory. Additional resources beyond the free quota are billed. For details, see Billing overview of OpenSearch Vector Search Edition. Scenario Template The template used to create the table. Valid values: Common Template, Vector: Image Search, and Vector: Semantic Search for Text. In the Data synchronization step, set Full Data Source to API and click Next.

Setting the data source to API means data is pushed to the instance through API calls rather than pulled from an external storage system.
In the Field configuration step, add fields for the table and click Next.

The primary key field and vector field are both required. The primary key field must be of the INT or STRING type. The vector field must be of the FLOAT type.
The vector field is a multi-value FLOAT field by default. Multiple values are separated by the HA3 delimiter (
^], encoded as\x1Din UTF format). To use a different separator, enter a custom multi-value delimiter.In the Index schema step, configure the vector index and click Next.

In the Vector Index section, configure the following parameters:
Parameter Description Fields Contained Three fixed fields are supported: primary key field (required), vector field (required), and namespace field (optional). No additional fields can be added. Vector Dimension The dimension of the vectors. Match the output dimension of your embedding model. Distance Type The metric used to measure vector similarity. Valid values: SquareEuclidean and InnerProduct. Match the metric used by your embedding model. Vector Index Algorithm The algorithm used to build the vector index. Valid values: Qc, Linear, and HNSW. Match the algorithm recommended by your embedding model. Real-time Indexing Whether to build real-time indexes for incremental data pushed via API. Default value: true. For advanced vector index settings, see Common configurations of vector indexes.

In the Confirm step, click Confirm. The table is created automatically.

Verify the table status
To check the creation progress, click Change History in the left-side pane on the instance details page, then click the Data Source Changes tab.

When the table enters the In Use state, it is ready. Run a test query on the Query Test page to confirm that the table is working correctly.

Usage notes
When reindexing an API data source, the system clears all previously synchronized data and re-synchronizes from the specified timestamp in real time. Proceed with caution.
What's next
After the table enters the In Use state, push data to the instance using the OpenSearch API to populate the table for search.