Skip to content

QueryVectorsInput

Source code in docs_src/capo_s3vectors/types/query_vectors_input.py
class QueryVectorsInput(TypedDict, closed=True):
    vector_bucket_name: NotRequired[
        "capo_s3vectors.types.vector_bucket_name.VectorBucketName"
    ]
    """<p>The name of the vector bucket that contains the vector index. </p>"""
    index_name: NotRequired["capo_s3vectors.types.index_name.IndexName"]
    """<p>The name of the vector index that you want to query. </p>"""
    index_arn: NotRequired["capo_s3vectors.types.index_arn.IndexArn"]
    """<p>The ARN of the vector index that you want to query.</p>"""
    top_k: "capo_s3vectors.types.top_k.TopK"
    """<p>The number of results to return for each query.</p>"""
    query_vector: "capo_s3vectors.types.vector_data.VectorData"
    """<p>The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions. </p>"""
    filter: NotRequired["object"]
    """<p>Metadata filter to apply during the query. For more information about metadata keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-metadata-filtering.html">Metadata filtering</a> in the <i>Amazon S3 User Guide</i>. </p>"""
    query_mode: NotRequired["capo_s3vectors.types.index_mode.IndexMode"]
    """<p>The mode to use to process the query. If you don't specify a query mode, the operation uses the mode that's currently configured for the vector index.</p> <p>Valid values:</p> <ul> <li> <p> <code>CLASSIC</code> - Applies metadata filters during the vector search. You can't specify <code>CLASSIC</code> for an <code>ENHANCED</code> index.</p> </li> <li> <p> <code>ENHANCED</code> - Applies metadata filters before the vector search.</p> </li> </ul>"""
    return_metadata: "bool"
    """<p>Indicates whether to include metadata in the response. The default value is <code>false</code>.</p>"""
    return_distance: "bool"
    """<p>Indicates whether to include the computed distance in the response. The default value is <code>false</code>.</p>"""
    next_token: NotRequired[
        "capo_s3vectors.types.query_vectors_next_token.QueryVectorsNextToken"
    ]
    """<p>Pagination token from a previous request. The value of this field is empty for an initial request.</p>"""

filter instance-attribute

filter: NotRequired[object]

Metadata filter to apply during the query. For more information about metadata keys, see Metadata filtering in the Amazon S3 User Guide.

index_arn instance-attribute

index_arn: NotRequired[IndexArn]

The ARN of the vector index that you want to query.

index_name instance-attribute

index_name: NotRequired[IndexName]

The name of the vector index that you want to query.

next_token instance-attribute

next_token: NotRequired[QueryVectorsNextToken]

Pagination token from a previous request. The value of this field is empty for an initial request.

query_mode instance-attribute

query_mode: NotRequired[IndexMode]

The mode to use to process the query. If you don't specify a query mode, the operation uses the mode that's currently configured for the vector index.

Valid values:

  • CLASSIC - Applies metadata filters during the vector search. You can't specify CLASSIC for an ENHANCED index.

  • ENHANCED - Applies metadata filters before the vector search.

query_vector instance-attribute

query_vector: VectorData

The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions.

return_distance instance-attribute

return_distance: bool

Indicates whether to include the computed distance in the response. The default value is false.

return_metadata instance-attribute

return_metadata: bool

Indicates whether to include metadata in the response. The default value is false.

top_k instance-attribute

top_k: TopK

The number of results to return for each query.

vector_bucket_name instance-attribute

vector_bucket_name: NotRequired[VectorBucketName]

The name of the vector bucket that contains the vector index.