Tutorial
Configure a vector index in an OpenSearch retrieval engine edition instance and use the SDK to retrieve data through vector queries.
Purchase an OpenSearch retrieval engine edition instance
To purchase an instance, see Purchase an OpenSearch Retrieval Engine Edition instance.
Configure the table
On the details page of a newly purchased instance, its status is "Pending Configuration". An empty cluster is automatically deployed with query and data nodes matching the purchased quantities and specifications. Configure the cluster through Basic Table Information > Data Synchronization > Index Schema > Index Rebuild before searching.
-
In the basic table information settings, specify a custom Table Name, set the Number of Shards, and set the Number of Data Update Resources.
-
A table supports at most 256 shards. We recommend no more than three times the number of data nodes in the instance.
-
Two data update resources are free by default. If the total exceeds two, you are billed for n - 2 resources, where n is the total number of data update resources for the table.
-
Configure the data source. Supported data sources include "MaxCompute data source", "API data source", "OSS data source", "Data Lake Formation (DLF)". Using MaxCompute as an example, click Add Data Source, select MaxCompute as the type, and specify the AccessKey, AccessKey Secret, Project, Table, and Partition. You can enable "Automatic reindexing".
-
After the data source is configured, configure the Index Schema.
Define at least two fields: a primary key field and a vector field (the vector field must use a multi-value float type):
To associate vectors with categories, add a category field of a single-value or multi-value integer type:
Attribute and field content compression:
-
You can enable or disable compression for attribute fields. Form Mode provides Uncompressed and Compressed options. In Developer Mode, use no_compressor or file_compressor.
-
Field content compression is disabled by default. The default compression type is uniq for multi-value and STRING fields, and equal for single-value numeric fields.