Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,6 @@ message Ranker {
oneof ranker {
// Reciprocal Rank Fusion ranking.
ReciprocalRankFusion rrf = 1;

// Vertex AI ranking.
VertexRanker vertex = 2;
}
}

Expand All @@ -422,24 +419,6 @@ message ReciprocalRankFusion {
repeated double weights = 1 [(google.api.field_behavior) = REQUIRED];
}

// Defines a ranker using the Vertex AI ranking service.
// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
// details.
message VertexRanker {
// Required. The query against which the records are ranked and scored.
string query = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The template used to generate the record's title.
string title_template = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The template used to generate the record's content.
string content_template = 3 [(google.api.field_behavior) = OPTIONAL];

// Required. The model used for ranking documents. If no model is specified,
// then semantic-ranker-default@latest is used.
string model = 4 [(google.api.field_behavior) = REQUIRED];
}

// A response from a batch search operation.
message BatchSearchDataObjectsResponse {
// Output only. A list of search responses, one for each request in the batch.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,10 +16,13 @@ syntax = "proto3";

package google.cloud.vectorsearch.v1beta;

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.cloud.vectorsearch.v1beta";
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
option ruby_package = "Google::Cloud::VectorSearch::V1beta";

// Distance metric for vector search.
enum DistanceMetric {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ import "google/api/resource.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
option java_multiple_files = true;
option java_outer_classname = "DataObjectProto";
option java_package = "com.google.cloud.vectorsearch.v1beta";
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
option ruby_package = "Google::Cloud::VectorSearch::V1beta";

// A dataObject resource in Vector Search.
message DataObject {
Expand All @@ -44,8 +47,7 @@ message DataObject {
string name = 1 [(google.api.field_behavior) = IDENTIFIER];

// Output only. The id of the dataObject.
string data_object_id = 2
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
string data_object_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Timestamp the dataObject was created at.
google.protobuf.Timestamp create_time = 4
Expand All @@ -60,6 +62,9 @@ message DataObject {

// Optional. The vectors of the dataObject.
map<string, Vector> vectors = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. The etag of the dataObject.
string etag = 8 [(google.api.field_behavior) = OPTIONAL];
}

// A vector which can be either dense or sparse.
Expand All @@ -73,7 +78,7 @@ message Vector {
SparseVector sparse = 3;
}

// The values of the vector.
// Deprecated: Use `dense` or `sparse` instead.
repeated float values = 1 [deprecated = true];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ import "google/cloud/vectorsearch/v1beta/data_object.proto";
import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
import "google/protobuf/struct.proto";

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
option java_multiple_files = true;
option java_outer_classname = "DataObjectSearchServiceProto";
option java_package = "com.google.cloud.vectorsearch.v1beta";
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
option ruby_package = "Google::Cloud::VectorSearch::V1beta";

// Service for searching data objects.
service DataObjectSearchService {
Expand Down Expand Up @@ -98,21 +101,60 @@ message OutputFields {
message SearchHint {
// Message to specify the index to use for the search.
message IndexHint {
// Parameters for dense ScaNN.
message DenseScannParams {
// Optional. Dense ANN param overrides to control recall and latency.
// The percentage of leaves to search, in the range [0, 100].
int32 search_leaves_pct = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. The number of initial candidates. Must be a positive integer
// (> 0).
int32 initial_candidate_count = 2
[(google.api.field_behavior) = OPTIONAL];
}

// The parameters for the index.
oneof params {
// Optional. Dense ScaNN parameters.
DenseScannParams dense_scann_params = 2
[(google.api.field_behavior) = OPTIONAL];
}

// Required. The resource name of the index to use for the search.
// The index must be in the same project, location, and collection.
// Format:
// `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
string name = 1 [(google.api.field_behavior) = REQUIRED];
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "vectorsearch.googleapis.com/Index"
}
];
}

// KnnHint will be used if search should be explicitly done on system's
// default K-Nearest Neighbor (KNN) index engine.
message KnnHint {}

// The type of index to use.
oneof index_type {
// Optional. Specifies that the search should use a particular index.
IndexHint use_index = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Deprecated: Use `index_hint` instead.
// Specifies that the search should use a particular index.
IndexHint use_index = 1
[deprecated = true, (google.api.field_behavior) = OPTIONAL];

// Optional. Deprecated: Use `knn_hint` instead.
// If set to true, the search will use the system's default
// K-Nearest Neighbor (KNN) index engine.
bool use_knn = 2
[deprecated = true, (google.api.field_behavior) = OPTIONAL];

// Optional. If set to true, the search will use the system's default
// Optional. If set, the search will use the system's default
// K-Nearest Neighbor (KNN) index engine.
bool use_knn = 2 [(google.api.field_behavior) = OPTIONAL];
KnnHint knn_hint = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Specifies that the search should use a particular index.
IndexHint index_hint = 4 [(google.api.field_behavior) = OPTIONAL];
}
}

Expand Down Expand Up @@ -161,8 +203,7 @@ message VectorSearch {

// Optional. The distance metric to use for the KNN search. If not specified,
// DOT_PRODUCT will be used as the default.
google.cloud.vectorsearch.v1beta.DistanceMetric distance_metric = 11
[(google.api.field_behavior) = OPTIONAL];
DistanceMetric distance_metric = 11 [(google.api.field_behavior) = OPTIONAL];
}

// Defines a semantic search operation.
Expand All @@ -174,8 +215,8 @@ message SemanticSearch {
// Required. The vector field to search.
string search_field = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. The task type of the query embedding.
EmbeddingTaskType task_type = 5 [(google.api.field_behavior) = OPTIONAL];
// Required. The task type of the query embedding.
EmbeddingTaskType task_type = 5 [(google.api.field_behavior) = REQUIRED];

// Optional. The fields to return in the search results.
OutputFields output_fields = 3 [(google.api.field_behavior) = OPTIONAL];
Expand Down Expand Up @@ -235,7 +276,9 @@ message SearchDataObjectsRequest {
}
];

// Optional. The standard list page size.
// Optional. The standard list page size. Only supported for KNN. If not set,
// up to search_type.top_k results will be returned. The maximum value is
// 1000; values above 1000 will be coerced to 1000.
int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];

// Optional. The standard list page token.
Expand All @@ -252,7 +295,8 @@ message SearchResult {
// Output only. The matching data object.
DataObject data_object = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The similarity distance.
// Output only. Similarity distance or ranker score returned by
// BatchSearchDataObjects.
optional double distance = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

Expand All @@ -263,7 +307,12 @@ message SearchResponseMetadata {
// Output only. The resource name of the index used for the search.
// Format:
// `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "vectorsearch.googleapis.com/Index"
}
];
}

// The type of index used.
Expand Down Expand Up @@ -315,8 +364,9 @@ message AggregateDataObjectsRequest {
// Response message for
// [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
message AggregateDataObjectsResponse {
// The aggregated results of the query.
repeated google.protobuf.Struct aggregate_results = 1;
// Output only. The aggregated results of the query.
repeated google.protobuf.Struct aggregate_results = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request message for
Expand All @@ -338,7 +388,8 @@ message QueryDataObjectsRequest {
// Optional. Mask specifying which fields to return.
OutputFields output_fields = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. The standard list page size.
// Optional. The standard list page size. Default is 100.
// The maximum value is 1000; values above 1000 will be coerced to 1000.
int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];

// Optional. The standard list page token.
Expand All @@ -353,13 +404,14 @@ message QueryDataObjectsRequest {
// Response message for
// [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects].
message QueryDataObjectsResponse {
// The list of dataObjects that match the query.
repeated DataObject data_objects = 4;
// Output only. The list of dataObjects that match the query.
repeated DataObject data_objects = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// A token to retrieve next page of results.
// Output only. A token to retrieve next page of results.
// Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to
// obtain that page.
string next_page_token = 3;
string next_page_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A request to perform a batch of search operations.
Expand Down Expand Up @@ -399,9 +451,6 @@ message Ranker {
oneof ranker {
// Reciprocal Rank Fusion ranking.
ReciprocalRankFusion rrf = 1;

// Vertex AI ranking.
VertexRanker vertex = 2;
}
}

Expand All @@ -411,24 +460,6 @@ message ReciprocalRankFusion {
repeated double weights = 1 [(google.api.field_behavior) = REQUIRED];
}

// Defines a ranker using the Vertex AI ranking service.
// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
// details.
message VertexRanker {
// Required. The query against which the records are ranked and scored.
string query = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The template used to generate the record's title.
string title_template = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The template used to generate the record's content.
string content_template = 3 [(google.api.field_behavior) = OPTIONAL];

// Required. The model used for ranking documents. If no model is specified,
// then semantic-ranker-default@latest is used.
string model = 4 [(google.api.field_behavior) = REQUIRED];
}

// A response from a batch search operation.
message BatchSearchDataObjectsResponse {
// Output only. A list of search responses, one for each request in the batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ import "google/cloud/vectorsearch/v1beta/data_object.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
option java_multiple_files = true;
option java_outer_classname = "DataObjectServiceProto";
option java_package = "com.google.cloud.vectorsearch.v1beta";
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
option ruby_package = "Google::Cloud::VectorSearch::V1beta";

// Service for creating and managing data objects.
service DataObjectService {
Expand Down Expand Up @@ -146,8 +149,9 @@ message BatchCreateDataObjectsRequest {
// Response message for
// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects].
message BatchCreateDataObjectsResponse {
// DataObjects created.
repeated DataObject data_objects = 1;
// Output only. DataObjects created.
repeated DataObject data_objects = 1
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Request message for
Expand Down Expand Up @@ -212,6 +216,11 @@ message DeleteDataObjectRequest {
type: "vectorsearch.googleapis.com/DataObject"
}
];

// Optional. The current etag of the DataObject.
// If an etag is provided and does not match the current etag of the
// DataObject, deletion will be blocked and an ABORTED error will be returned.
string etag = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ package google.cloud.vectorsearch.v1beta;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
option java_multiple_files = true;
option java_outer_classname = "EmbeddingConfigProto";
option java_package = "com.google.cloud.vectorsearch.v1beta";
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
option ruby_package = "Google::Cloud::VectorSearch::V1beta";

// Represents the task the embeddings will be used for.
enum EmbeddingTaskType {
Expand Down
Loading