Skip to content

Commit d6a2197

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added TextSearch support to the batch search API
docs: Added clarification of expected format of collection and index fields PiperOrigin-RevId: 834645993
1 parent 0a299a2 commit d6a2197

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

google/cloud/vectorsearch/v1beta/BUILD.bazel

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ ruby_grpc_library(
313313
ruby_cloud_gapic_library(
314314
name = "vectorsearch_ruby_gapic",
315315
srcs = [":vectorsearch_proto_with_info"],
316-
extra_protoc_parameters = [
317-
"ruby-cloud-gem-name=google-cloud-vectorsearch-v1beta",
318-
],
316+
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-vectorsearch-v1beta"],
319317
grpc_service_config = "vectorsearch_v1beta_grpc_service_config.json",
320318
rest_numeric_enums = True,
321319
service_yaml = "vectorsearch_v1beta.yaml",
@@ -350,7 +348,6 @@ load(
350348

351349
csharp_proto_library(
352350
name = "vectorsearch_csharp_proto",
353-
extra_opts = [],
354351
deps = [":vectorsearch_proto"],
355352
)
356353

google/cloud/vectorsearch/v1beta/data_object_search_service.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ message Search {
125125

126126
// A semantic search.
127127
SemanticSearch semantic_search = 2;
128+
129+
// A text search operation.
130+
TextSearch text_search = 3;
128131
}
129132
}
130133

@@ -176,6 +179,10 @@ message SemanticSearch {
176179
// Optional. The fields to return in the search results.
177180
OutputFields output_fields = 3 [(google.api.field_behavior) = OPTIONAL];
178181

182+
// Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
183+
// represented as a google.protobuf.Struct.
184+
google.protobuf.Struct filter = 6 [(google.api.field_behavior) = OPTIONAL];
185+
179186
// Optional. The number of data objects to return.
180187
optional int32 top_k = 4 [(google.api.field_behavior) = OPTIONAL];
181188
}

google/cloud/vectorsearch/v1beta/vectorsearch_service.proto

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,14 @@ message Collection {
192192
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
193193

194194
// Optional. Schema for vector fields. Only vector fields in this schema will
195-
// be searchable.
195+
// be searchable. Field names must contain only alphanumeric characters,
196+
// underscores, and hyphens.
196197
map<string, VectorField> vector_schema = 7
197198
[(google.api.field_behavior) = OPTIONAL];
198199

199200
// Optional. JSON Schema for data.
201+
// Field names must contain only alphanumeric characters,
202+
// underscores, and hyphens.
200203
google.protobuf.Struct data_schema = 10
201204
[(google.api.field_behavior) = OPTIONAL];
202205
}
@@ -285,9 +288,11 @@ message CreateCollectionRequest {
285288
}
286289
];
287290

288-
// Required. Id of the requesting object
289-
// If auto-generating Id server-side, remove this field and
290-
// collection_id from the method_signature of Create RPC
291+
// Required. ID of the Collection to create.
292+
// The id must be 1-63 characters long, and comply with
293+
// <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
294+
// Specifically, it must be 1-63 characters long and match the regular
295+
// expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
291296
string collection_id = 2 [(google.api.field_behavior) = REQUIRED];
292297

293298
// Required. The resource being created
@@ -441,9 +446,11 @@ message CreateIndexRequest {
441446
}
442447
];
443448

444-
// Required. Id of the requesting object
445-
// If auto-generating Id server-side, remove this field and
446-
// index_id from the method_signature of Create RPC
449+
// Required. ID of the Index to create.
450+
// The id must be 1-63 characters long, and comply with
451+
// <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
452+
// Specifically, it must be 1-63 characters long and match the regular
453+
// expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
447454
string index_id = 2 [(google.api.field_behavior) = REQUIRED];
448455

449456
// Required. The resource being created

google/cloud/vectorsearch/v1beta/vectorsearch_v1beta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ authentication:
7676
7777
publishing:
7878
new_issue_uri: https://issuetracker.google.com/issues/new?component=1899904
79-
documentation_uri: https://docs.cloud.google.com/vertex-ai/docs/vector-search/overview
79+
documentation_uri: https://docs.cloud.google.com/vertex-ai/docs/vector-search-2/overview
8080
api_short_name: vectorsearch
8181
github_label: 'api: vectorsearch'
8282
doc_tag_prefix: vectorsearch

0 commit comments

Comments
 (0)