google-cloud-vector_search-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/vector_search/v1/bindings_override.rb +75 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/client.rb +851 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/credentials.rb +47 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/paths.rb +73 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/rest/client.rb +788 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/rest/service_stub.rb +329 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service/rest.rb +53 -0
- data/lib/google/cloud/vector_search/v1/data_object_search_service.rb +55 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/client.rb +1115 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/credentials.rb +47 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/paths.rb +73 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/rest/client.rb +1031 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/rest/service_stub.rb +513 -0
- data/lib/google/cloud/vector_search/v1/data_object_service/rest.rb +53 -0
- data/lib/google/cloud/vector_search/v1/data_object_service.rb +55 -0
- data/lib/google/cloud/vector_search/v1/rest.rb +40 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/client.rb +1831 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/credentials.rb +47 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/operations.rb +843 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/paths.rb +111 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/rest/client.rb +1712 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/rest/operations.rb +927 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/rest/service_stub.rb +819 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service/rest.rb +58 -0
- data/lib/google/cloud/vector_search/v1/vector_search_service.rb +60 -0
- data/lib/google/cloud/vector_search/v1/version.rb +7 -2
- data/lib/google/cloud/vector_search/v1.rb +47 -0
- data/lib/google/cloud/vectorsearch/v1/common_pb.rb +21 -0
- data/lib/google/cloud/vectorsearch/v1/data_object_pb.rb +29 -0
- data/lib/google/cloud/vectorsearch/v1/data_object_search_service_pb.rb +50 -0
- data/lib/google/cloud/vectorsearch/v1/data_object_search_service_services_pb.rb +51 -0
- data/lib/google/cloud/vectorsearch/v1/data_object_service_pb.rb +37 -0
- data/lib/google/cloud/vectorsearch/v1/data_object_service_services_pb.rb +57 -0
- data/lib/google/cloud/vectorsearch/v1/embedding_config_pb.rb +24 -0
- data/lib/google/cloud/vectorsearch/v1/encryption_spec_pb.rb +24 -0
- data/lib/google/cloud/vectorsearch/v1/vectorsearch_service_pb.rb +69 -0
- data/lib/google/cloud/vectorsearch/v1/vectorsearch_service_services_pb.rb +71 -0
- data/lib/google-cloud-vector_search-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/vectorsearch/v1/common.rb +38 -0
- data/proto_docs/google/cloud/vectorsearch/v1/data_object.rb +104 -0
- data/proto_docs/google/cloud/vectorsearch/v1/data_object_search_service.rb +397 -0
- data/proto_docs/google/cloud/vectorsearch/v1/data_object_service.rb +156 -0
- data/proto_docs/google/cloud/vectorsearch/v1/embedding_config.rb +76 -0
- data/proto_docs/google/cloud/vectorsearch/v1/encryption_spec.rb +40 -0
- data/proto_docs/google/cloud/vectorsearch/v1/vectorsearch_service.rb +723 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +122 -9
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module VectorSearch
|
|
23
|
+
module V1
|
|
24
|
+
# Defines a output fields struct for data in DataObject.
|
|
25
|
+
# @!attribute [rw] data_fields
|
|
26
|
+
# @return [::Array<::String>]
|
|
27
|
+
# Optional. The fields from the data fields to include in the output.
|
|
28
|
+
# @!attribute [rw] vector_fields
|
|
29
|
+
# @return [::Array<::String>]
|
|
30
|
+
# Optional. The fields from the vector fields to include in the output.
|
|
31
|
+
# @!attribute [rw] metadata_fields
|
|
32
|
+
# @return [::Array<::String>]
|
|
33
|
+
# Optional. The fields from the DataObject metadata to include in the output.
|
|
34
|
+
class OutputFields
|
|
35
|
+
include ::Google::Protobuf::MessageExts
|
|
36
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Represents a hint to the search index engine.
|
|
40
|
+
# @!attribute [rw] knn_hint
|
|
41
|
+
# @return [::Google::Cloud::VectorSearch::V1::SearchHint::KnnHint]
|
|
42
|
+
# Optional. If set, the search will use the system's default
|
|
43
|
+
# K-Nearest Neighbor (KNN) index engine.
|
|
44
|
+
#
|
|
45
|
+
# Note: The following fields are mutually exclusive: `knn_hint`, `index_hint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
46
|
+
# @!attribute [rw] index_hint
|
|
47
|
+
# @return [::Google::Cloud::VectorSearch::V1::SearchHint::IndexHint]
|
|
48
|
+
# Optional. Specifies that the search should use a particular index.
|
|
49
|
+
#
|
|
50
|
+
# Note: The following fields are mutually exclusive: `index_hint`, `knn_hint`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
51
|
+
class SearchHint
|
|
52
|
+
include ::Google::Protobuf::MessageExts
|
|
53
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
54
|
+
|
|
55
|
+
# Message to specify the index to use for the search.
|
|
56
|
+
# @!attribute [rw] name
|
|
57
|
+
# @return [::String]
|
|
58
|
+
# Required. The resource name of the index to use for the search.
|
|
59
|
+
# The index must be in the same project, location, and collection.
|
|
60
|
+
# Format:
|
|
61
|
+
# `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}`
|
|
62
|
+
class IndexHint
|
|
63
|
+
include ::Google::Protobuf::MessageExts
|
|
64
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# KnnHint will be used if search should be explicitly done on system's
|
|
68
|
+
# default K-Nearest Neighbor (KNN) index engine.
|
|
69
|
+
class KnnHint
|
|
70
|
+
include ::Google::Protobuf::MessageExts
|
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# A single search request within a batch operation.
|
|
76
|
+
# @!attribute [rw] vector_search
|
|
77
|
+
# @return [::Google::Cloud::VectorSearch::V1::VectorSearch]
|
|
78
|
+
# A vector-based search.
|
|
79
|
+
#
|
|
80
|
+
# Note: The following fields are mutually exclusive: `vector_search`, `semantic_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
81
|
+
# @!attribute [rw] semantic_search
|
|
82
|
+
# @return [::Google::Cloud::VectorSearch::V1::SemanticSearch]
|
|
83
|
+
# A semantic search.
|
|
84
|
+
#
|
|
85
|
+
# Note: The following fields are mutually exclusive: `semantic_search`, `vector_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
86
|
+
# @!attribute [rw] text_search
|
|
87
|
+
# @return [::Google::Cloud::VectorSearch::V1::TextSearch]
|
|
88
|
+
# A text search operation.
|
|
89
|
+
#
|
|
90
|
+
# Note: The following fields are mutually exclusive: `text_search`, `vector_search`, `semantic_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
91
|
+
class Search
|
|
92
|
+
include ::Google::Protobuf::MessageExts
|
|
93
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Defines a search operation using a query vector.
|
|
97
|
+
# @!attribute [rw] vector
|
|
98
|
+
# @return [::Google::Cloud::VectorSearch::V1::DenseVector]
|
|
99
|
+
# A dense vector for the query.
|
|
100
|
+
#
|
|
101
|
+
# Note: The following fields are mutually exclusive: `vector`, `sparse_vector`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
102
|
+
# @!attribute [rw] sparse_vector
|
|
103
|
+
# @return [::Google::Cloud::VectorSearch::V1::SparseVector]
|
|
104
|
+
# A sparse vector for the query.
|
|
105
|
+
#
|
|
106
|
+
# Note: The following fields are mutually exclusive: `sparse_vector`, `vector`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
107
|
+
# @!attribute [rw] search_field
|
|
108
|
+
# @return [::String]
|
|
109
|
+
# Required. The vector field to search.
|
|
110
|
+
# @!attribute [rw] filter
|
|
111
|
+
# @return [::Google::Protobuf::Struct]
|
|
112
|
+
# Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
|
|
113
|
+
# represented as a google.protobuf.Struct.
|
|
114
|
+
# @!attribute [rw] top_k
|
|
115
|
+
# @return [::Integer]
|
|
116
|
+
# Optional. The number of nearest neighbors to return.
|
|
117
|
+
# @!attribute [rw] output_fields
|
|
118
|
+
# @return [::Google::Cloud::VectorSearch::V1::OutputFields]
|
|
119
|
+
# Optional. Mask specifying which fields to return.
|
|
120
|
+
# @!attribute [rw] search_hint
|
|
121
|
+
# @return [::Google::Cloud::VectorSearch::V1::SearchHint]
|
|
122
|
+
# Optional. Sets the search hint. If no strategy is specified, the service
|
|
123
|
+
# will use an index if one is available, and fall back to the default KNN
|
|
124
|
+
# search otherwise.
|
|
125
|
+
# @!attribute [rw] distance_metric
|
|
126
|
+
# @return [::Google::Cloud::VectorSearch::V1::DistanceMetric]
|
|
127
|
+
# Optional. The distance metric to use for the KNN search. If not specified,
|
|
128
|
+
# DOT_PRODUCT will be used as the default.
|
|
129
|
+
class VectorSearch
|
|
130
|
+
include ::Google::Protobuf::MessageExts
|
|
131
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Defines a semantic search operation.
|
|
135
|
+
# @!attribute [rw] search_text
|
|
136
|
+
# @return [::String]
|
|
137
|
+
# Required. The query text, which is used to generate an embedding according
|
|
138
|
+
# to the embedding model specified in the collection config.
|
|
139
|
+
# @!attribute [rw] search_field
|
|
140
|
+
# @return [::String]
|
|
141
|
+
# Required. The vector field to search.
|
|
142
|
+
# @!attribute [rw] task_type
|
|
143
|
+
# @return [::Google::Cloud::VectorSearch::V1::EmbeddingTaskType]
|
|
144
|
+
# Required. The task type of the query embedding.
|
|
145
|
+
# @!attribute [rw] output_fields
|
|
146
|
+
# @return [::Google::Cloud::VectorSearch::V1::OutputFields]
|
|
147
|
+
# Optional. The fields to return in the search results.
|
|
148
|
+
# @!attribute [rw] filter
|
|
149
|
+
# @return [::Google::Protobuf::Struct]
|
|
150
|
+
# Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
|
|
151
|
+
# represented as a google.protobuf.Struct.
|
|
152
|
+
# @!attribute [rw] top_k
|
|
153
|
+
# @return [::Integer]
|
|
154
|
+
# Optional. The number of data objects to return.
|
|
155
|
+
# @!attribute [rw] search_hint
|
|
156
|
+
# @return [::Google::Cloud::VectorSearch::V1::SearchHint]
|
|
157
|
+
# Optional. Sets the search hint. If no strategy is specified, the service
|
|
158
|
+
# will use an index if one is available, and fall back to KNN search
|
|
159
|
+
# otherwise.
|
|
160
|
+
class SemanticSearch
|
|
161
|
+
include ::Google::Protobuf::MessageExts
|
|
162
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Defines a text search operation.
|
|
166
|
+
# @!attribute [rw] search_text
|
|
167
|
+
# @return [::String]
|
|
168
|
+
# Optional. The query text. Required when using the default text search mode.
|
|
169
|
+
# @!attribute [rw] data_field_names
|
|
170
|
+
# @return [::Array<::String>]
|
|
171
|
+
# Optional. The data field names to search. Required when using the default
|
|
172
|
+
# text search mode.
|
|
173
|
+
# @!attribute [rw] output_fields
|
|
174
|
+
# @return [::Google::Cloud::VectorSearch::V1::OutputFields]
|
|
175
|
+
# Optional. The fields to return in the search results.
|
|
176
|
+
# @!attribute [rw] top_k
|
|
177
|
+
# @return [::Integer]
|
|
178
|
+
# Optional. The number of results to return.
|
|
179
|
+
# @!attribute [rw] filter
|
|
180
|
+
# @return [::Google::Protobuf::Struct]
|
|
181
|
+
# Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`,
|
|
182
|
+
# represented as a `google.protobuf.Struct`.
|
|
183
|
+
class TextSearch
|
|
184
|
+
include ::Google::Protobuf::MessageExts
|
|
185
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Request for performing a single search.
|
|
189
|
+
# @!attribute [rw] vector_search
|
|
190
|
+
# @return [::Google::Cloud::VectorSearch::V1::VectorSearch]
|
|
191
|
+
# A vector search operation.
|
|
192
|
+
#
|
|
193
|
+
# Note: The following fields are mutually exclusive: `vector_search`, `semantic_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
194
|
+
# @!attribute [rw] semantic_search
|
|
195
|
+
# @return [::Google::Cloud::VectorSearch::V1::SemanticSearch]
|
|
196
|
+
# A semantic search operation.
|
|
197
|
+
#
|
|
198
|
+
# Note: The following fields are mutually exclusive: `semantic_search`, `vector_search`, `text_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
199
|
+
# @!attribute [rw] text_search
|
|
200
|
+
# @return [::Google::Cloud::VectorSearch::V1::TextSearch]
|
|
201
|
+
# Optional. A text search operation.
|
|
202
|
+
#
|
|
203
|
+
# Note: The following fields are mutually exclusive: `text_search`, `vector_search`, `semantic_search`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
204
|
+
# @!attribute [rw] parent
|
|
205
|
+
# @return [::String]
|
|
206
|
+
# Required. The resource name of the Collection for which to search.
|
|
207
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
208
|
+
# @!attribute [rw] page_size
|
|
209
|
+
# @return [::Integer]
|
|
210
|
+
# Optional. The standard list page size. Only supported for KNN. If not set,
|
|
211
|
+
# up to search_type.top_k results will be returned. The maximum value is
|
|
212
|
+
# 1000; values above 1000 will be coerced to 1000.
|
|
213
|
+
# @!attribute [rw] page_token
|
|
214
|
+
# @return [::String]
|
|
215
|
+
# Optional. The standard list page token.
|
|
216
|
+
# Typically obtained via
|
|
217
|
+
# {::Google::Cloud::VectorSearch::V1::SearchDataObjectsResponse#next_page_token SearchDataObjectsResponse.next_page_token}
|
|
218
|
+
# of the previous
|
|
219
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#search_data_objects DataObjectSearchService.SearchDataObjects}
|
|
220
|
+
# call.
|
|
221
|
+
class SearchDataObjectsRequest
|
|
222
|
+
include ::Google::Protobuf::MessageExts
|
|
223
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# A single search result.
|
|
227
|
+
# @!attribute [r] data_object
|
|
228
|
+
# @return [::Google::Cloud::VectorSearch::V1::DataObject]
|
|
229
|
+
# Output only. The matching data object.
|
|
230
|
+
# @!attribute [r] distance
|
|
231
|
+
# @return [::Float]
|
|
232
|
+
# Output only. Similarity distance or ranker score returned by
|
|
233
|
+
# BatchSearchDataObjects.
|
|
234
|
+
class SearchResult
|
|
235
|
+
include ::Google::Protobuf::MessageExts
|
|
236
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Response for a search request.
|
|
240
|
+
# @!attribute [r] results
|
|
241
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::SearchResult>]
|
|
242
|
+
# Output only. The list of dataObjects that match the search criteria.
|
|
243
|
+
# @!attribute [r] next_page_token
|
|
244
|
+
# @return [::String]
|
|
245
|
+
# Output only. A token to retrieve next page of results.
|
|
246
|
+
# Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to
|
|
247
|
+
# obtain that page.
|
|
248
|
+
class SearchDataObjectsResponse
|
|
249
|
+
include ::Google::Protobuf::MessageExts
|
|
250
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Request message for
|
|
254
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#aggregate_data_objects DataObjectSearchService.AggregateDataObjects}.
|
|
255
|
+
# @!attribute [rw] parent
|
|
256
|
+
# @return [::String]
|
|
257
|
+
# Required. The resource name of the Collection for which to query.
|
|
258
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
259
|
+
# @!attribute [rw] filter
|
|
260
|
+
# @return [::Google::Protobuf::Struct]
|
|
261
|
+
# Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
|
|
262
|
+
# represented as a google.protobuf.Struct.
|
|
263
|
+
# @!attribute [rw] aggregate
|
|
264
|
+
# @return [::Google::Cloud::VectorSearch::V1::AggregationMethod]
|
|
265
|
+
# Required. The aggregation method to apply to the query.
|
|
266
|
+
class AggregateDataObjectsRequest
|
|
267
|
+
include ::Google::Protobuf::MessageExts
|
|
268
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Response message for
|
|
272
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#aggregate_data_objects DataObjectSearchService.AggregateDataObjects}.
|
|
273
|
+
# @!attribute [r] aggregate_results
|
|
274
|
+
# @return [::Array<::Google::Protobuf::Struct>]
|
|
275
|
+
# Output only. The aggregated results of the query.
|
|
276
|
+
class AggregateDataObjectsResponse
|
|
277
|
+
include ::Google::Protobuf::MessageExts
|
|
278
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Request message for
|
|
282
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}.
|
|
283
|
+
# @!attribute [rw] parent
|
|
284
|
+
# @return [::String]
|
|
285
|
+
# Required. The resource name of the Collection for which to query.
|
|
286
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
287
|
+
# @!attribute [rw] filter
|
|
288
|
+
# @return [::Google::Protobuf::Struct]
|
|
289
|
+
# Optional. A JSON filter expression, e.g. \\{"genre": \\{"$eq": "sci-fi"}},
|
|
290
|
+
# represented as a google.protobuf.Struct.
|
|
291
|
+
# @!attribute [rw] output_fields
|
|
292
|
+
# @return [::Google::Cloud::VectorSearch::V1::OutputFields]
|
|
293
|
+
# Optional. Mask specifying which fields to return.
|
|
294
|
+
# @!attribute [rw] page_size
|
|
295
|
+
# @return [::Integer]
|
|
296
|
+
# Optional. The standard list page size. Default is 100.
|
|
297
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
298
|
+
# @!attribute [rw] page_token
|
|
299
|
+
# @return [::String]
|
|
300
|
+
# Optional. The standard list page token.
|
|
301
|
+
# Typically obtained via
|
|
302
|
+
# {::Google::Cloud::VectorSearch::V1::QueryDataObjectsResponse#next_page_token QueryDataObjectsResponse.next_page_token}
|
|
303
|
+
# of the previous
|
|
304
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}
|
|
305
|
+
# call.
|
|
306
|
+
class QueryDataObjectsRequest
|
|
307
|
+
include ::Google::Protobuf::MessageExts
|
|
308
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Response message for
|
|
312
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectSearchService::Client#query_data_objects DataObjectSearchService.QueryDataObjects}.
|
|
313
|
+
# @!attribute [r] data_objects
|
|
314
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::DataObject>]
|
|
315
|
+
# Output only. The list of dataObjects that match the query.
|
|
316
|
+
# @!attribute [r] next_page_token
|
|
317
|
+
# @return [::String]
|
|
318
|
+
# Output only. A token to retrieve next page of results.
|
|
319
|
+
# Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to
|
|
320
|
+
# obtain that page.
|
|
321
|
+
class QueryDataObjectsResponse
|
|
322
|
+
include ::Google::Protobuf::MessageExts
|
|
323
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# A request to perform a batch of search operations.
|
|
327
|
+
# @!attribute [rw] parent
|
|
328
|
+
# @return [::String]
|
|
329
|
+
# Required. The resource name of the Collection for which to search.
|
|
330
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
331
|
+
# @!attribute [rw] searches
|
|
332
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::Search>]
|
|
333
|
+
# Required. A list of search requests to execute in parallel.
|
|
334
|
+
# @!attribute [rw] combine
|
|
335
|
+
# @return [::Google::Cloud::VectorSearch::V1::BatchSearchDataObjectsRequest::CombineResultsOptions]
|
|
336
|
+
# Optional. Options for combining the results of the batch search operations.
|
|
337
|
+
class BatchSearchDataObjectsRequest
|
|
338
|
+
include ::Google::Protobuf::MessageExts
|
|
339
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
340
|
+
|
|
341
|
+
# Options for combining the results of the batch search operations.
|
|
342
|
+
# @!attribute [rw] ranker
|
|
343
|
+
# @return [::Google::Cloud::VectorSearch::V1::Ranker]
|
|
344
|
+
# Required. The ranker to use for combining the results.
|
|
345
|
+
# @!attribute [rw] output_fields
|
|
346
|
+
# @return [::Google::Cloud::VectorSearch::V1::OutputFields]
|
|
347
|
+
# Optional. Mask specifying which fields to return.
|
|
348
|
+
# @!attribute [rw] top_k
|
|
349
|
+
# @return [::Integer]
|
|
350
|
+
# Optional. The number of results to return. If not set, a default value
|
|
351
|
+
# will be used.
|
|
352
|
+
class CombineResultsOptions
|
|
353
|
+
include ::Google::Protobuf::MessageExts
|
|
354
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Defines a ranker to combine results from multiple searches.
|
|
359
|
+
# @!attribute [rw] rrf
|
|
360
|
+
# @return [::Google::Cloud::VectorSearch::V1::ReciprocalRankFusion]
|
|
361
|
+
# Reciprocal Rank Fusion ranking.
|
|
362
|
+
class Ranker
|
|
363
|
+
include ::Google::Protobuf::MessageExts
|
|
364
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
|
|
368
|
+
# @!attribute [rw] weights
|
|
369
|
+
# @return [::Array<::Float>]
|
|
370
|
+
# Required. The weights to apply to each search result set during fusion.
|
|
371
|
+
class ReciprocalRankFusion
|
|
372
|
+
include ::Google::Protobuf::MessageExts
|
|
373
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# A response from a batch search operation.
|
|
377
|
+
# @!attribute [r] results
|
|
378
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::SearchDataObjectsResponse>]
|
|
379
|
+
# Output only. A list of search responses, one for each request in the batch.
|
|
380
|
+
# If a ranker is used, a single ranked list of results is returned.
|
|
381
|
+
class BatchSearchDataObjectsResponse
|
|
382
|
+
include ::Google::Protobuf::MessageExts
|
|
383
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Aggregation methods.
|
|
387
|
+
module AggregationMethod
|
|
388
|
+
# Should not be used.
|
|
389
|
+
AGGREGATION_METHOD_UNSPECIFIED = 0
|
|
390
|
+
|
|
391
|
+
# Count the number of data objects that match the filter.
|
|
392
|
+
COUNT = 1
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module VectorSearch
|
|
23
|
+
module V1
|
|
24
|
+
# Request message for
|
|
25
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#create_data_object DataObjectService.CreateDataObject}.
|
|
26
|
+
# @!attribute [rw] parent
|
|
27
|
+
# @return [::String]
|
|
28
|
+
# Required. The resource name of the Collection to create the DataObject in.
|
|
29
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
30
|
+
# @!attribute [rw] data_object_id
|
|
31
|
+
# @return [::String]
|
|
32
|
+
# Required. The id of the dataObject to create.
|
|
33
|
+
# The id must be 1-63 characters long, and comply with
|
|
34
|
+
# [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
35
|
+
# Specifically, it must be 1-63 characters long and match the regular
|
|
36
|
+
# expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
|
|
37
|
+
# @!attribute [rw] data_object
|
|
38
|
+
# @return [::Google::Cloud::VectorSearch::V1::DataObject]
|
|
39
|
+
# Required. The DataObject to create.
|
|
40
|
+
class CreateDataObjectRequest
|
|
41
|
+
include ::Google::Protobuf::MessageExts
|
|
42
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Request message for
|
|
46
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_create_data_objects DataObjectService.BatchCreateDataObjects}.
|
|
47
|
+
# @!attribute [rw] parent
|
|
48
|
+
# @return [::String]
|
|
49
|
+
# Required. The resource name of the Collection to create the DataObjects in.
|
|
50
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
51
|
+
# The parent field in the CreateDataObjectRequest messages must match this
|
|
52
|
+
# field.
|
|
53
|
+
# @!attribute [rw] requests
|
|
54
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::CreateDataObjectRequest>]
|
|
55
|
+
# Required. The request message specifying the resources to create.
|
|
56
|
+
# A maximum of 1000 DataObjects can be created in a batch.
|
|
57
|
+
class BatchCreateDataObjectsRequest
|
|
58
|
+
include ::Google::Protobuf::MessageExts
|
|
59
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Response message for
|
|
63
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_create_data_objects DataObjectService.BatchCreateDataObjects}.
|
|
64
|
+
# @!attribute [r] data_objects
|
|
65
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::DataObject>]
|
|
66
|
+
# Output only. DataObjects created.
|
|
67
|
+
class BatchCreateDataObjectsResponse
|
|
68
|
+
include ::Google::Protobuf::MessageExts
|
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Request message for
|
|
73
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#get_data_object DataObjectService.GetDataObject}.
|
|
74
|
+
# @!attribute [rw] name
|
|
75
|
+
# @return [::String]
|
|
76
|
+
# Required. The name of the DataObject resource.
|
|
77
|
+
# Format:
|
|
78
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
|
|
79
|
+
class GetDataObjectRequest
|
|
80
|
+
include ::Google::Protobuf::MessageExts
|
|
81
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Request message for
|
|
85
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#update_data_object DataObjectService.UpdateDataObject}.
|
|
86
|
+
# @!attribute [rw] data_object
|
|
87
|
+
# @return [::Google::Cloud::VectorSearch::V1::DataObject]
|
|
88
|
+
# Required. The DataObject which replaces the resource on the server.
|
|
89
|
+
# @!attribute [rw] update_mask
|
|
90
|
+
# @return [::Google::Protobuf::FieldMask]
|
|
91
|
+
# Optional. The update mask applies to the resource. See
|
|
92
|
+
# {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
|
|
93
|
+
class UpdateDataObjectRequest
|
|
94
|
+
include ::Google::Protobuf::MessageExts
|
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Request message for
|
|
99
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_update_data_objects DataObjectService.BatchUpdateDataObjects}.
|
|
100
|
+
# @!attribute [rw] parent
|
|
101
|
+
# @return [::String]
|
|
102
|
+
# Required. The resource name of the Collection to update the DataObjects in.
|
|
103
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
104
|
+
# The parent field in the UpdateDataObjectRequest messages must match this
|
|
105
|
+
# field.
|
|
106
|
+
# @!attribute [rw] requests
|
|
107
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::UpdateDataObjectRequest>]
|
|
108
|
+
# Required. The request message specifying the resources to update.
|
|
109
|
+
# A maximum of 1000 DataObjects can be updated in a batch.
|
|
110
|
+
class BatchUpdateDataObjectsRequest
|
|
111
|
+
include ::Google::Protobuf::MessageExts
|
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Response message for
|
|
116
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_update_data_objects DataObjectService.BatchUpdateDataObjects}.
|
|
117
|
+
class BatchUpdateDataObjectsResponse
|
|
118
|
+
include ::Google::Protobuf::MessageExts
|
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Request message for
|
|
123
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#delete_data_object DataObjectService.DeleteDataObject}.
|
|
124
|
+
# @!attribute [rw] name
|
|
125
|
+
# @return [::String]
|
|
126
|
+
# Required. The name of the DataObject resource to be deleted.
|
|
127
|
+
# Format:
|
|
128
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
|
|
129
|
+
# @!attribute [rw] etag
|
|
130
|
+
# @return [::String]
|
|
131
|
+
# Optional. The current etag of the DataObject.
|
|
132
|
+
# If an etag is provided and does not match the current etag of the
|
|
133
|
+
# DataObject, deletion will be blocked and an ABORTED error will be returned.
|
|
134
|
+
class DeleteDataObjectRequest
|
|
135
|
+
include ::Google::Protobuf::MessageExts
|
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Request message for
|
|
140
|
+
# {::Google::Cloud::VectorSearch::V1::DataObjectService::Client#batch_delete_data_objects DataObjectService.BatchDeleteDataObjects}.
|
|
141
|
+
# @!attribute [rw] parent
|
|
142
|
+
# @return [::String]
|
|
143
|
+
# Required. The resource name of the Collection to delete the DataObjects in.
|
|
144
|
+
# Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
145
|
+
# @!attribute [rw] requests
|
|
146
|
+
# @return [::Array<::Google::Cloud::VectorSearch::V1::DeleteDataObjectRequest>]
|
|
147
|
+
# Required. The request message specifying the resources to delete.
|
|
148
|
+
# A maximum of 1000 DataObjects can be deleted in a batch.
|
|
149
|
+
class BatchDeleteDataObjectsRequest
|
|
150
|
+
include ::Google::Protobuf::MessageExts
|
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module VectorSearch
|
|
23
|
+
module V1
|
|
24
|
+
# Message describing the configuration for generating embeddings for a vector
|
|
25
|
+
# field using Vertex AI embeddings API.
|
|
26
|
+
# @!attribute [rw] model_id
|
|
27
|
+
# @return [::String]
|
|
28
|
+
# Required. Required: ID of the embedding model to use. See
|
|
29
|
+
# https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models
|
|
30
|
+
# for the list of supported models.
|
|
31
|
+
# @!attribute [rw] text_template
|
|
32
|
+
# @return [::String]
|
|
33
|
+
# Required. Required: Text template for the input to the model. The template
|
|
34
|
+
# must contain one or more references to fields in the DataObject, e.g.:
|
|
35
|
+
# "Movie Title: \\{title} ---- Movie Plot: \\{plot}".
|
|
36
|
+
# @!attribute [rw] task_type
|
|
37
|
+
# @return [::Google::Cloud::VectorSearch::V1::EmbeddingTaskType]
|
|
38
|
+
# Required. Required: Task type for the embeddings.
|
|
39
|
+
class VertexEmbeddingConfig
|
|
40
|
+
include ::Google::Protobuf::MessageExts
|
|
41
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Represents the task the embeddings will be used for.
|
|
45
|
+
module EmbeddingTaskType
|
|
46
|
+
# Unspecified task type.
|
|
47
|
+
EMBEDDING_TASK_TYPE_UNSPECIFIED = 0
|
|
48
|
+
|
|
49
|
+
# Specifies the given text is a query in a search/retrieval setting.
|
|
50
|
+
RETRIEVAL_QUERY = 1
|
|
51
|
+
|
|
52
|
+
# Specifies the given text is a document from the corpus being searched.
|
|
53
|
+
RETRIEVAL_DOCUMENT = 2
|
|
54
|
+
|
|
55
|
+
# Specifies the given text will be used for STS.
|
|
56
|
+
SEMANTIC_SIMILARITY = 3
|
|
57
|
+
|
|
58
|
+
# Specifies that the given text will be classified.
|
|
59
|
+
CLASSIFICATION = 4
|
|
60
|
+
|
|
61
|
+
# Specifies that the embeddings will be used for clustering.
|
|
62
|
+
CLUSTERING = 5
|
|
63
|
+
|
|
64
|
+
# Specifies that the embeddings will be used for question answering.
|
|
65
|
+
QUESTION_ANSWERING = 6
|
|
66
|
+
|
|
67
|
+
# Specifies that the embeddings will be used for fact verification.
|
|
68
|
+
FACT_VERIFICATION = 7
|
|
69
|
+
|
|
70
|
+
# Specifies that the embeddings will be used for code retrieval.
|
|
71
|
+
CODE_RETRIEVAL_QUERY = 8
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module VectorSearch
|
|
23
|
+
module V1
|
|
24
|
+
# Represents a customer-managed encryption key specification that can be
|
|
25
|
+
# applied to a Vector Search collection.
|
|
26
|
+
# @!attribute [rw] crypto_key_name
|
|
27
|
+
# @return [::String]
|
|
28
|
+
# Required. Resource name of the Cloud KMS key used to protect the resource.
|
|
29
|
+
#
|
|
30
|
+
# The Cloud KMS key must be in the same region as the resource. It must have
|
|
31
|
+
# the format
|
|
32
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
|
33
|
+
class EncryptionSpec
|
|
34
|
+
include ::Google::Protobuf::MessageExts
|
|
35
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|