Class VectorSearch (0.1.0)

VectorSearch(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Defines a search operation using a query vector.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
vector google.cloud.vectorsearch_v1beta.types.DenseVector
A dense vector for the query. This field is a member of oneof_ vector_type.
sparse_vector google.cloud.vectorsearch_v1beta.types.SparseVector
A sparse vector for the query. This field is a member of oneof_ vector_type.
search_field str
Required. The vector field to search.
filter google.protobuf.struct_pb2.Struct
Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
top_k int
Optional. The number of nearest neighbors to return. This field is a member of oneof_ _top_k.
output_fields google.cloud.vectorsearch_v1beta.types.OutputFields
Optional. Mask specifying which fields to return.
search_hint google.cloud.vectorsearch_v1beta.types.SearchHint
Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to the default KNN search otherwise.
distance_metric google.cloud.vectorsearch_v1beta.types.DistanceMetric
Optional. The distance metric to use for the KNN search. If not specified, DOT_PRODUCT will be used as the default.