Skip to content

Commit c83d354

Browse files
Google APIscopybara-github
authored andcommitted
fix!: Removed obsolete field vertex from message .google.cloud.vectorsearch.v1.Ranker
fix!: Removed obsolete message `VertexRanker` feat: Added index and search configuration management docs: Updated documentation for Index Creation, Import Data Objects, Search PiperOrigin-RevId: 876429709
1 parent 5328d71 commit c83d354

File tree

7 files changed

+183
-61
lines changed

7 files changed

+183
-61
lines changed

google/cloud/vectorsearch/v1beta/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ load(
348348

349349
csharp_proto_library(
350350
name = "vectorsearch_csharp_proto",
351+
extra_opts = [],
351352
deps = [":vectorsearch_proto"],
352353
)
353354

google/cloud/vectorsearch/v1beta/common.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,10 +16,13 @@ syntax = "proto3";
1616

1717
package google.cloud.vectorsearch.v1beta;
1818

19+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
1920
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
2021
option java_multiple_files = true;
2122
option java_outer_classname = "CommonProto";
2223
option java_package = "com.google.cloud.vectorsearch.v1beta";
24+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
25+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
2326

2427
// Distance metric for vector search.
2528
enum DistanceMetric {

google/cloud/vectorsearch/v1beta/data_object.proto

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ import "google/api/resource.proto";
2121
import "google/protobuf/struct.proto";
2222
import "google/protobuf/timestamp.proto";
2323

24+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
2425
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
2526
option java_multiple_files = true;
2627
option java_outer_classname = "DataObjectProto";
2728
option java_package = "com.google.cloud.vectorsearch.v1beta";
29+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
30+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
2831

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

4649
// Output only. The id of the dataObject.
47-
string data_object_id = 2
48-
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
50+
string data_object_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
4951

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

6163
// Optional. The vectors of the dataObject.
6264
map<string, Vector> vectors = 7 [(google.api.field_behavior) = OPTIONAL];
65+
66+
// Optional. The etag of the dataObject.
67+
string etag = 8 [(google.api.field_behavior) = OPTIONAL];
6368
}
6469

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

76-
// The values of the vector.
81+
// Deprecated: Use `dense` or `sparse` instead.
7782
repeated float values = 1 [deprecated = true];
7883
}
7984

google/cloud/vectorsearch/v1beta/data_object_search_service.proto

Lines changed: 71 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ import "google/cloud/vectorsearch/v1beta/data_object.proto";
2525
import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
2626
import "google/protobuf/struct.proto";
2727

28+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
2829
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
2930
option java_multiple_files = true;
3031
option java_outer_classname = "DataObjectSearchServiceProto";
3132
option java_package = "com.google.cloud.vectorsearch.v1beta";
33+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
34+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
3235

3336
// Service for searching data objects.
3437
service DataObjectSearchService {
@@ -98,21 +101,60 @@ message OutputFields {
98101
message SearchHint {
99102
// Message to specify the index to use for the search.
100103
message IndexHint {
104+
// Parameters for dense ScaNN.
105+
message DenseScannParams {
106+
// Optional. Dense ANN param overrides to control recall and latency.
107+
// The percentage of leaves to search, in the range [0, 100].
108+
int32 search_leaves_pct = 1 [(google.api.field_behavior) = OPTIONAL];
109+
110+
// Optional. The number of initial candidates. Must be a positive integer
111+
// (> 0).
112+
int32 initial_candidate_count = 2
113+
[(google.api.field_behavior) = OPTIONAL];
114+
}
115+
116+
// The parameters for the index.
117+
oneof params {
118+
// Optional. Dense ScaNN parameters.
119+
DenseScannParams dense_scann_params = 2
120+
[(google.api.field_behavior) = OPTIONAL];
121+
}
122+
101123
// Required. The resource name of the index to use for the search.
102124
// The index must be in the same project, location, and collection.
103125
// Format:
104126
// `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
105-
string name = 1 [(google.api.field_behavior) = REQUIRED];
127+
string name = 1 [
128+
(google.api.field_behavior) = REQUIRED,
129+
(google.api.resource_reference) = {
130+
type: "vectorsearch.googleapis.com/Index"
131+
}
132+
];
106133
}
107134

135+
// KnnHint will be used if search should be explicitly done on system's
136+
// default K-Nearest Neighbor (KNN) index engine.
137+
message KnnHint {}
138+
108139
// The type of index to use.
109140
oneof index_type {
110-
// Optional. Specifies that the search should use a particular index.
111-
IndexHint use_index = 1 [(google.api.field_behavior) = OPTIONAL];
141+
// Optional. Deprecated: Use `index_hint` instead.
142+
// Specifies that the search should use a particular index.
143+
IndexHint use_index = 1
144+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
145+
146+
// Optional. Deprecated: Use `knn_hint` instead.
147+
// If set to true, the search will use the system's default
148+
// K-Nearest Neighbor (KNN) index engine.
149+
bool use_knn = 2
150+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
112151

113-
// Optional. If set to true, the search will use the system's default
152+
// Optional. If set, the search will use the system's default
114153
// K-Nearest Neighbor (KNN) index engine.
115-
bool use_knn = 2 [(google.api.field_behavior) = OPTIONAL];
154+
KnnHint knn_hint = 3 [(google.api.field_behavior) = OPTIONAL];
155+
156+
// Optional. Specifies that the search should use a particular index.
157+
IndexHint index_hint = 4 [(google.api.field_behavior) = OPTIONAL];
116158
}
117159
}
118160

@@ -161,8 +203,7 @@ message VectorSearch {
161203

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

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

177-
// Optional. The task type of the query embedding.
178-
EmbeddingTaskType task_type = 5 [(google.api.field_behavior) = OPTIONAL];
218+
// Required. The task type of the query embedding.
219+
EmbeddingTaskType task_type = 5 [(google.api.field_behavior) = REQUIRED];
179220

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

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

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

255-
// Output only. The similarity distance.
298+
// Output only. Similarity distance or ranker score returned by
299+
// BatchSearchDataObjects.
256300
optional double distance = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
257301
}
258302

@@ -263,7 +307,12 @@ message SearchResponseMetadata {
263307
// Output only. The resource name of the index used for the search.
264308
// Format:
265309
// `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
266-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
310+
string name = 1 [
311+
(google.api.field_behavior) = OUTPUT_ONLY,
312+
(google.api.resource_reference) = {
313+
type: "vectorsearch.googleapis.com/Index"
314+
}
315+
];
267316
}
268317

269318
// The type of index used.
@@ -315,8 +364,9 @@ message AggregateDataObjectsRequest {
315364
// Response message for
316365
// [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
317366
message AggregateDataObjectsResponse {
318-
// The aggregated results of the query.
319-
repeated google.protobuf.Struct aggregate_results = 1;
367+
// Output only. The aggregated results of the query.
368+
repeated google.protobuf.Struct aggregate_results = 1
369+
[(google.api.field_behavior) = OUTPUT_ONLY];
320370
}
321371

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

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

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

359-
// A token to retrieve next page of results.
411+
// Output only. A token to retrieve next page of results.
360412
// Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to
361413
// obtain that page.
362-
string next_page_token = 3;
414+
string next_page_token = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
363415
}
364416

365417
// A request to perform a batch of search operations.
@@ -399,9 +451,6 @@ message Ranker {
399451
oneof ranker {
400452
// Reciprocal Rank Fusion ranking.
401453
ReciprocalRankFusion rrf = 1;
402-
403-
// Vertex AI ranking.
404-
VertexRanker vertex = 2;
405454
}
406455
}
407456

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

414-
// Defines a ranker using the Vertex AI ranking service.
415-
// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
416-
// details.
417-
message VertexRanker {
418-
// Required. The query against which the records are ranked and scored.
419-
string query = 1 [(google.api.field_behavior) = REQUIRED];
420-
421-
// Optional. The template used to generate the record's title.
422-
string title_template = 2 [(google.api.field_behavior) = OPTIONAL];
423-
424-
// Optional. The template used to generate the record's content.
425-
string content_template = 3 [(google.api.field_behavior) = OPTIONAL];
426-
427-
// Required. The model used for ranking documents. If no model is specified,
428-
// then semantic-ranker-default@latest is used.
429-
string model = 4 [(google.api.field_behavior) = REQUIRED];
430-
}
431-
432463
// A response from a batch search operation.
433464
message BatchSearchDataObjectsResponse {
434465
// Output only. A list of search responses, one for each request in the batch.

google/cloud/vectorsearch/v1beta/data_object_service.proto

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ import "google/cloud/vectorsearch/v1beta/data_object.proto";
2424
import "google/protobuf/empty.proto";
2525
import "google/protobuf/field_mask.proto";
2626

27+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
2728
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
2829
option java_multiple_files = true;
2930
option java_outer_classname = "DataObjectServiceProto";
3031
option java_package = "com.google.cloud.vectorsearch.v1beta";
32+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
33+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
3134

3235
// Service for creating and managing data objects.
3336
service DataObjectService {
@@ -146,8 +149,9 @@ message BatchCreateDataObjectsRequest {
146149
// Response message for
147150
// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects].
148151
message BatchCreateDataObjectsResponse {
149-
// DataObjects created.
150-
repeated DataObject data_objects = 1;
152+
// Output only. DataObjects created.
153+
repeated DataObject data_objects = 1
154+
[(google.api.field_behavior) = OUTPUT_ONLY];
151155
}
152156

153157
// Request message for
@@ -212,6 +216,11 @@ message DeleteDataObjectRequest {
212216
type: "vectorsearch.googleapis.com/DataObject"
213217
}
214218
];
219+
220+
// Optional. The current etag of the DataObject.
221+
// If an etag is provided and does not match the current etag of the
222+
// DataObject, deletion will be blocked and an ABORTED error will be returned.
223+
string etag = 2 [(google.api.field_behavior) = OPTIONAL];
215224
}
216225

217226
// Request message for

google/cloud/vectorsearch/v1beta/embedding_config.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ package google.cloud.vectorsearch.v1beta;
1818

1919
import "google/api/field_behavior.proto";
2020

21+
option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
2122
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
2223
option java_multiple_files = true;
2324
option java_outer_classname = "EmbeddingConfigProto";
2425
option java_package = "com.google.cloud.vectorsearch.v1beta";
26+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1beta";
27+
option ruby_package = "Google::Cloud::VectorSearch::V1beta";
2528

2629
// Represents the task the embeddings will be used for.
2730
enum EmbeddingTaskType {

0 commit comments

Comments
 (0)