Method: projects.locations.collections.dataObjects.batchSearch

Batch searches data objects.

HTTP request

POST https://vectorsearch.googleapis.com/v1/{parent}/dataObjects:batchSearch

Path parameters

Parameters
parent

string

Required. The resource name of the Collection for which to search. Format: projects/{project}/locations/{location}/collections/{collection}

Request body

The request body contains data with the following structure:

JSON representation
{
  "searches": [
    {
      object (Search)
    }
  ],
  "combine": {
    object (CombineResultsOptions)
  }
}
Fields
searches[]

object (Search)

Required. A list of search requests to execute in parallel.

combine

object (CombineResultsOptions)

Optional. Options for combining the results of the batch search operations.

Response body

A response from a batch search operation.

If successful, the response body contains data with the following structure:

JSON representation
{
  "results": [
    {
      object (SearchDataObjectsResponse)
    }
  ]
}
Fields
results[]

object (SearchDataObjectsResponse)

Output only. A list of search responses, one for each request in the batch. If a ranker is used, a single ranked list of results is returned.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • vectorsearch.dataObjects.search

For more information, see the IAM documentation.

CombineResultsOptions

Options for combining the results of the batch search operations.

JSON representation
{
  "ranker": {
    object (Ranker)
  },
  "outputFields": {
    object (OutputFields)
  },
  "topK": integer
}
Fields
ranker

object (Ranker)

Required. The ranker to use for combining the results.

outputFields

object (OutputFields)

Optional. Mask specifying which fields to return.

topK

integer

Optional. The number of results to return. If not set, a default value will be used.

Ranker

Defines a ranker to combine results from multiple searches.

JSON representation
{

  // Union field ranker can be only one of the following:
  "rrf": {
    object (ReciprocalRankFusion)
  },
  "vertex": {
    object (VertexRanker)
  }
  // End of list of possible types for union field ranker.
}
Fields
Union field ranker. The ranking method to use. ranker can be only one of the following:
rrf

object (ReciprocalRankFusion)

Reciprocal Rank Fusion ranking.

vertex

object (VertexRanker)

Vertex AI ranking.

ReciprocalRankFusion

Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.

JSON representation
{
  "weights": [
    number
  ]
}
Fields
weights[]

number

Required. The weights to apply to each search result set during fusion.

VertexRanker

Defines a ranker using the Vertex AI ranking service. See https://cloud.google.com/generative-ai-app-builder/docs/ranking for details.

JSON representation
{
  "query": string,
  "titleTemplate": string,
  "contentTemplate": string,
  "model": string
}
Fields
query

string

Required. The query against which the records are ranked and scored.

titleTemplate

string

Optional. The template used to generate the record's title.

contentTemplate

string

Optional. The template used to generate the record's content.

model

string

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.