vectors
Creates, updates, deletes, gets or lists a vectors resource.
Overview
| Name | vectors |
| Type | Resource |
| Id | aws.dynamodb.vectors |
Fields
The following fields are returned by SELECT queries:
- search_vectors
| Name | Datatype | Description |
|---|---|---|
consumed_capacity | object | The capacity units consumed by the SearchVectors operation. Contains VectorSearchRequestBytes, which represents the vector search capacity consumed. |
search_results | array | A list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
search_vectors | select | region | Performs a vector similarity search on a vector index associated with an Amazon DynamoDB table, and returns the most similar items sorted by similarity score based on the distance function configured for the index. Score interpretation depends on the distance function: COSINE - Returns the items with the k smallest scores. Scores range from 0 (identical) to 2 (opposite). Lower scores indicate higher similarity. EUCLIDEAN - Returns the items with the k smallest scores. Scores represent the Euclidean distance between vectors. Lower scores indicate higher similarity. DOT_PRODUCT - Returns the items with the k highest scores. Higher scores indicate higher similarity. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- search_vectors
Performs a vector similarity search on a vector index associated with an Amazon DynamoDB table, and returns the most similar items sorted by similarity score based on the distance function configured for the index. Score interpretation depends on the distance function: COSINE - Returns the items with the k smallest scores. Scores range from 0 (identical) to 2 (opposite). Lower scores indicate higher similarity. EUCLIDEAN - Returns the items with the k smallest scores. Scores represent the Euclidean distance between vectors. Lower scores indicate higher similarity. DOT_PRODUCT - Returns the items with the k highest scores. Higher scores indicate higher similarity.
SELECT
consumed_capacity,
search_results
FROM aws.dynamodb.vectors
WHERE region = '{{ region }}' -- required
;