After the engine rebuilds the index, you can start searching. The Vector Search Edition provides a Query Test feature in the console to help you test queries. It supports three types of queries: vector query, primary key query, and hybrid vector-text query. This topic describes vector queries.
Entry point
Choose Query Test > Vector Query. Select the name of the table to query. You can use Form mode or Developer mode. You can switch between the modes using the drop-down list in the upper-right corner. Form mode is selected by default.

Form mode
You can use the form to edit query parameters. The results are displayed in the list below. This mode does not support all query features.

Query parameters:
Table name: Required. The table to query. From the drop-down list, select a table that is in use.
Index name: Required. After you select a table, the index name is automatically populated. You do not need to select it.
TopK: Required. The maximum number of search results to return. The default value is 10. Enter an integer greater than 0.
Filter condition: Optional. The supported operators include
>, <, =, <=, >=, and !=. You can useAND, OR, and ()to connect multiple conditions. For more information, see the Filter expression syntax.Query type: Required. The data type of the query, such as vector, image, or text.
Namespace: Optional. Specifies the namespace used to run a partitioned query on a vector index.
Result order: Required. Select ASC (ascending) or DESC (descending). The default value is ASC. If the table uses inner product distance, a higher score indicates greater relevance, so select DESC. If the table uses Euclidean distance, a lower score indicates greater relevance, so select ASC.
Query content: If the query type is vector, enter the vector value in an array format. If the query type is image, upload a local image or provide a Base64-encoded string. If the query type is text, enter the text content.
Query type: Vector
After you select a table name, the index name is automatically displayed. You do not need to select it. Set the query type to vector. A prompt to enter the vector dimensions appears in the input box below:

Enter the data for the vector dimensions and click Search. The search results are displayed in the list below, as shown in the following figure:

Query type: Image
After you select a table name, the index name is automatically displayed. You do not need to select it. Set the query type to image. This option is available only for tables that use the built-in embedding feature of OpenSearch. Options for the image type are displayed. You can upload an image or use Base64 encoding. By default, Base64 encoding is selected, as shown in the following figure:

Upload an image

Click Upload Image to select a local image. You can enable the multi-subject identification mode. Click Search. The results are displayed as follows:

Multi-subject identification results:
All detected subjects are framed and numbered.
By default, the search results for the subject with the largest pixel area are displayed. The subject's area is highlighted in the image.
You can click a subject's number to switch the search subject. The search results and the highlighted area in the image change accordingly.
Image upload rules:
The supported image formats are png, jpg, and jpeg.
The image size cannot exceed 2 MB.
Use Base64 encoding

Select Base64 encoding. Enter the Base64-encoded value and click Search. The results are displayed as follows:

Query type: Text
After you select a table name, the index name is automatically displayed. You do not need to select it. Set the query type to text. A prompt to enter text content appears in the input box below. Text search is available only for tables that have the embedding feature enabled:

Enter the text content and click Search. The search results are displayed in the list below, as shown in the following figure:

Developer mode
Both queries and results display the original statements and support all query features.

Enter the query parameters in the search box and click Search. The search results are displayed in the pane on the right, as shown in the following figure:

The following is an example of a single-vector query:
{
"vector": [0.345263,0.346272,0.33663.....],
"topK": 10,
"indexName": "",
"includeVector": true,
"namespace":"test1"
}vector: The format is
list[float]. Enter the vector value. The number of dimensions must match the number of dimensions that are configured for the engine.topK: The number of results to return. Set this parameter as needed. The default value is 10.
indexName: Optional. The name of the vector index.
includeVector: Specifies whether to return the vector information in the document. The default value is
true.namespace: This parameter is required if the instance is configured with a category. Otherwise, it is optional.
The following is an example of a query with multiple vectors and multiple namespaces:
{
"tableName": "gist",
"indexName": "vec_index",
"queries": [
{
"vector": [0.1, 0.2, 0.3],
"namespace": "space_a"
},
{
"vector": [0.4, 0.5, 0.6],
"namespace": "space_b"
}
]
"topK": 3,
"includeVector": true
}For more information, see Vector query.
Notes
The following limitations apply to queries in Form mode:
Queries across multiple namespaces are not supported.
Queries across multiple vector indexes at the same time are not supported.
Queries with multiple vectors are not supported.
By default, the vector information in the document is returned.
All source table columns and their values for the corresponding document are returned by default, and this behavior cannot be changed.
The results are filtered by default.