Batch searches data objects.
HTTP request
POST https://vectorsearch.googleapis.com/v1beta/{parent}/dataObjects:batchSearch
Path parameters
| Parameters | |
|---|---|
parent |
Required. The resource name of the Collection for which to search. Format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "searches": [ { object ( |
| Fields | |
|---|---|
searches[] |
Required. A list of search requests to execute in parallel. |
combine |
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 ( |
| Fields | |
|---|---|
results[] |
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.
Search
A single search request within a batch operation.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field search_type. The type of search to perform. search_type can be only one of the following: |
|
vectorSearch |
A vector-based search. |
semanticSearch |
A semantic search. |
textSearch |
A text search operation. |
CombineResultsOptions
Options for combining the results of the batch search operations.
| JSON representation |
|---|
{ "ranker": { object ( |
| Fields | |
|---|---|
ranker |
Required. The ranker to use for combining the results. |
outputFields |
Optional. Mask specifying which fields to return. |
topK |
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 |
| Fields | |
|---|---|
Union field ranker. The ranking method to use. ranker can be only one of the following: |
|
rrf |
Reciprocal Rank Fusion ranking. |
vertex |
Vertex AI ranking. |
ReciprocalRankFusion
Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
| JSON representation |
|---|
{ "weights": [ number ] } |
| Fields | |
|---|---|
weights[] |
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 |
Required. The query against which the records are ranked and scored. |
titleTemplate |
Optional. The template used to generate the record's title. |
contentTemplate |
Optional. The template used to generate the record's content. |
model |
Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used. |