VectorSearch

Defines a search operation using a query vector.

JSON representation
{
  "searchField": string,
  "filter": {
    object
  },
  "outputFields": {
    object (OutputFields)
  },
  "searchHint": {
    object (SearchHint)
  },
  "distanceMetric": enum (DistanceMetric),

  // Union field vector_type can be only one of the following:
  "vector": {
    object (DenseVector)
  },
  "sparseVector": {
    object (SparseVector)
  }
  // End of list of possible types for union field vector_type.
  "topK": integer
}
Fields
searchField

string

Required. The vector field to search.

filter

object (Struct format)

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.

outputFields

object (OutputFields)

Optional. Mask specifying which fields to return.

searchHint

object (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.

distanceMetric

enum (DistanceMetric)

Optional. The distance metric to use for the KNN search. If not specified, DOT_PRODUCT will be used as the default.

Union field vector_type.

vector_type can be only one of the following:

vector

object (DenseVector)

A dense vector for the query.

sparseVector

object (SparseVector)

A sparse vector for the query.

topK

integer

Optional. The number of nearest neighbors to return.