Quick Start for the General-purpose Edition

Updated at:

This guide walks you through the end-to-end setup of an OpenSearch Vector Search Edition instance: from purchasing an instance to running your first vector query.

Prerequisites

Before you begin, ensure that you have:

How it works

After purchase, your instance enters the Pending Configuration state. The system automatically deploys an empty instance based on the number and specifications of Query Result Searcher (QRS) workers and Searcher workers you selected. The instance is not ready for search queries until you complete the following steps:

  1. Configure a table

  2. Add a data source

  3. Configure fields

  4. Configure the index schema

  5. Confirm creation and trigger reindexing

image.png

Configure an instance

In the instance list, find the target instance and click Configure in the Actions column to enter the configuration page.

Step 1: Configure the basic table information

  1. On the instance details page, click Table Management in the left-side pane.

  2. Click Add Table.

  3. In the Basic Table Information step of the Create wizard, configure the following parameters, then click Next.

ParameterDescription
Table NameA custom name for the table.
Data ShardsThe number of data shards in the table. If you create multiple index tables in an instance, all tables must have the same shard count—or at least one table must have one shard and all others must share the same count.
Number of Resources for Data UpdatesThe number of resources used for data updates. Each instance includes a free quota of two resources per data source. Each resource provides 4 CPU cores and 8 GB of memory. Resources beyond the free quota are charged. For pricing details, see Billing overview of OpenSearch Vector Search Edition.
Scenario TemplateThe template used to create the table. Options: Common Template, Vector: Image Search, and Vector: Semantic Search for Text.

The available scenario templates are:

  • General Template: An empty template with no preset fields or indexes.

Step 2: Add a data source

In the Data Synchronization step, add a data source. OpenSearch supports MaxCompute, API, and OSS data sources.

The following example uses MaxCompute + API as the Full Data Source:

  1. Configure the Project, AccessKey, AccessKey Secret, Table, and Partition Key parameters.

  2. Set Automatic Reindexing to Yes or No.

  3. Click Check. If the check passes, click Next.

For detailed setup instructions by data source type:

Step 3: Configure fields

OpenSearch automatically provides preset fields based on the Scenario Template you selected and imports all fields from your data source.

In the Field Configuration step, configure at least two required fields: a primary key field and a vector field.

Field requirements:

  • Primary key field: Set Type to INT or STRING and select the option in the Primary Key column.

  • Vector field: Set Type to FLOAT and select the checkbox in the Vector Field column. The vector field is a multi-value field by default, with values separated by HA3 delimiters (^], encoded as \x1D in UTF format). Custom delimiters are supported.

  • Category field (optional): Add a category field between the primary key field and the vector field to build a vector index organized by category.

When configuring a vector index, specify fields in this order: primary key field → namespace field (optional) → vector field.

The namespace field type is constrained by engine version. For engine version vector_service_1.0.2 or earlier, the namespace field cannot be of the STRING type. For later versions, no type restriction applies.

Step 4: Configure the index schema

OpenSearch automatically creates indexes for the primary key field and vector field, using the field names as index names.

In the Index Schema step, configure the vector index:

  • Index name: embedding

  • Vector dimension: 128

  • Distance type: SquaredEuclidean

  • Vector index algorithm: Qc

  • Real-time index: true

  • The Fields Contained parameter supports only three fixed fields and cannot be extended.

  • Separately configure the advanced configurations for the vector index. For details, see Common configurations of vector indexes.

  • If you have no special requirements, click Next to proceed with the auto-configured defaults.

Step 5: Confirm creation

In the Confirm step, review your configuration and click Confirm.

After confirmation, the system will automatically build the index. The estimated creation time is 2 minutes. After the build is complete, the index will be automatically enabled on the current instance.

The page redirects to the table management list. The status of the newly created table is displayed as Creating. Wait for the creation to complete.

Step 6: Verify progress in change history

In the left-side pane, click Change History. On the Data Source Changes tab, you can track all finite-state machines (FSMs) associated with table creation, index creation, and full-data reindexing.

The page displays the FSM process for two operations:

  • Add Table (Subscribe/Unsubscribe index table): Sequentially executes the following nodes: parameter check, modify subscription status, submit to online cluster, and wait for status to take effect.

  • Manual Full Trigger: Sequentially executes the following nodes: parameter check, trigger, and scan data source.

A green checkmark on each node indicates that the step is complete.

When all FSMs reach the completed state, the search engine is ready and you can run query tests.

Step 7: Run a query test

To test your instance, send a vector query. In production, vectors are typically generated by embedding models from text or image inputs. The sample below uses a pre-computed 128-dimensional float vector.

Use the following sample query:

{
  "vector": [0.0019676427,0.005902928,0.021644069,0.21644068,0.12199384,0.043288138,0.007870571,0.0,0.08460863,0.041320495,0.043288138,0.035417568,0.011805856,0.055093993,0.12592913,0.017708784,0.021644069,0.0019676427,0.0,0.0,0.0019676427,0.078705706,0.1987319,0.041320495,0.039352853,0.0039352854,0.007870571,0.0039352854,0.0039352854,0.017708784,0.035417568,0.06886749,0.0019676427,0.0019676427,0.013773498,0.049191065,0.2125054,0.22824654,0.123961486,0.0039352854,0.0,0.0,0.021644069,0.14560555,0.078705706,0.1987319,0.22824654,0.005902928,0.064932205,0.0019676427,0.0019676427,0.021644069,0.027546996,0.035417568,0.22824654,0.22824654,0.1337997,0.023611711,0.009838213,0.007870571,0.0039352854,0.0039352854,0.017708784,0.20069954,0.033449925,0.005902928,0.019676426,0.035417568,0.015741142,0.029514639,0.13183205,0.123961486,0.029514639,0.0,0.027546996,0.22824654,0.15741141,0.0,0.0039352854,0.043288138,0.18889369,0.072802775,0.055093993,0.17315255,0.08460863,0.0019676427,0.007870571,0.035417568,0.22824654,0.10034977,0.009838213,0.021644069,0.062964566,0.027546996,0.015741142,0.04525578,0.086576276,0.033449925,0.023611711,0.017708784,0.0,0.0,0.03738521,0.072802775,0.16724962,0.035417568,0.031482283,0.20463483,0.043288138,0.011805856,0.0039352854,0.051158708,0.023611711,0.11412327,0.13183205,0.16134669,0.049191065,0.023611711,0.0039352854,0.0039352854,0.049191065,0.035417568,0.015741142,0.0039352854,0.03738521,0.08264099,0.094446845,0.021644069],
  "topK": 10,
  "includeVector": true
}
FieldDescription
vectorThe query vector.
topKThe number of top results to return.
includeVectorWhether to include vector data in the results.

The Query Test page supports two modes: form mode and developer mode.

In form mode, the form includes Index Name, TopK, Filter Condition, Namespace, and Result Order configuration items. After the search is complete, the results table contains columns for distance score, primary key, vector value, attributes, and namespace.

In developer mode, query parameters also include indexName, used to specify the index name for the query. Example value: "embedding".

For more information about the query syntax, see the Query syntax reference section below.

Query syntax reference

What's next

  • Query data with the SDK: Run vector-based or primary key-based queries programmatically. See Query data.

  • Update data with the SDK: Upload or delete documents via the SDK. See Update Data.