google-cloud-discovery_engine-v1beta 0.7.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +235 -4
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +801 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +221 -4
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +1077 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +136 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +20 -3
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +91 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +20 -3
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +925 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +801 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +97 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +864 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +1077 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/service_stub.rb +403 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +887 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +801 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb +73 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +826 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +1077 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +366 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1beta/engine_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +22 -3
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +19 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +22 -3
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +48 -10
- data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +19 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +48 -10
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +646 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +146 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +599 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb +291 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +1635 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +801 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/paths.rb +127 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +1525 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +1077 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +860 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +8 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/data_store_service_pb.rb +62 -0
- data/lib/google/cloud/discoveryengine/v1beta/data_store_service_services_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +62 -0
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +8 -1
- data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +54 -0
- data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +54 -0
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +82 -0
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb +74 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +60 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion.rb +53 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +10 -4
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +19 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +216 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +219 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +179 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +66 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +41 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +22 -3
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +166 -15
- data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +247 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +85 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +160 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +528 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -3
- metadata +62 -116
@@ -813,6 +813,13 @@ module Google
|
|
813
813
|
# Uri, Body, Query string parameters
|
814
814
|
def self.transcode_list_operations_request request_pb
|
815
815
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
816
|
+
.with_bindings(
|
817
|
+
uri_method: :get,
|
818
|
+
uri_template: "/v1beta/{name}/operations",
|
819
|
+
matches: [
|
820
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/?$}, false]
|
821
|
+
]
|
822
|
+
)
|
816
823
|
.with_bindings(
|
817
824
|
uri_method: :get,
|
818
825
|
uri_template: "/v1beta/{name}/operations",
|
@@ -918,6 +925,13 @@ module Google
|
|
918
925
|
# Uri, Body, Query string parameters
|
919
926
|
def self.transcode_get_operation_request request_pb
|
920
927
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
928
|
+
.with_bindings(
|
929
|
+
uri_method: :get,
|
930
|
+
uri_template: "/v1beta/{name}",
|
931
|
+
matches: [
|
932
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+/?$}, false]
|
933
|
+
]
|
934
|
+
)
|
921
935
|
.with_bindings(
|
922
936
|
uri_method: :get,
|
923
937
|
uri_template: "/v1beta/{name}",
|
@@ -193,13 +193,15 @@ module Google
|
|
193
193
|
# @param options [::Gapic::CallOptions, ::Hash]
|
194
194
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
195
195
|
#
|
196
|
-
# @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
|
196
|
+
# @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
|
197
197
|
# Pass arguments to `search` via keyword arguments. Note that at
|
198
198
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
199
199
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
200
200
|
#
|
201
201
|
# @param serving_config [::String]
|
202
202
|
# Required. The resource name of the Search serving config, such as
|
203
|
+
# `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
204
|
+
# or
|
203
205
|
# `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
204
206
|
# This field is used to identify the serving configuration name, set
|
205
207
|
# of models used to make the search.
|
@@ -243,11 +245,35 @@ module Google
|
|
243
245
|
# expression is case-sensitive.
|
244
246
|
#
|
245
247
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
248
|
+
#
|
249
|
+
# Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
250
|
+
# key property defined in the Vertex AI Search backend -- this mapping is
|
251
|
+
# defined by the customer in their schema. For example a media customer might
|
252
|
+
# have a field 'name' in their schema. In this case the filter would look
|
253
|
+
# like this: filter --> name:'ANY("king kong")'
|
254
|
+
#
|
255
|
+
# For more information about filtering including syntax and filter
|
256
|
+
# operators, see
|
257
|
+
# [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
258
|
+
# @param canonical_filter [::String]
|
259
|
+
# The default filter that is applied when a user performs a search without
|
260
|
+
# checking any filters on the search page.
|
261
|
+
#
|
262
|
+
# The filter applied to every search request when quality improvement such as
|
263
|
+
# query expansion is needed. In the case a query does not have a sufficient
|
264
|
+
# amount of results this filter will be used to determine whether or not to
|
265
|
+
# enable the query expansion flow. The original filter will still be used for
|
266
|
+
# the query expanded search.
|
267
|
+
# This field is strongly recommended to achieve high search quality.
|
268
|
+
#
|
269
|
+
# For more information about filter syntax, see
|
270
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#filter SearchRequest.filter}.
|
246
271
|
# @param order_by [::String]
|
247
272
|
# The order in which documents are returned. Documents can be ordered by
|
248
273
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
249
274
|
# object. Leave it unset if ordered by relevance. `order_by` expression is
|
250
|
-
# case-sensitive.
|
275
|
+
# case-sensitive. For more information on ordering, see
|
276
|
+
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
251
277
|
#
|
252
278
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
253
279
|
# @param user_info [::Google::Cloud::DiscoveryEngine::V1beta::UserInfo, ::Hash]
|
@@ -262,6 +288,8 @@ module Google
|
|
262
288
|
# error is returned.
|
263
289
|
# @param boost_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec, ::Hash]
|
264
290
|
# Boost specification to boost certain documents.
|
291
|
+
# For more information on boosting, see
|
292
|
+
# [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
265
293
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
266
294
|
# Additional search parameters.
|
267
295
|
#
|
@@ -269,9 +297,17 @@ module Google
|
|
269
297
|
#
|
270
298
|
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
271
299
|
# are restricted or boosted based on the location provided.
|
300
|
+
# Example:
|
301
|
+
# user_country_code: "au"
|
302
|
+
#
|
303
|
+
# For available codes see [Country
|
304
|
+
# Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
305
|
+
#
|
272
306
|
# * `search_type`: double. Default empty. Enables non-webpage searching
|
273
|
-
#
|
274
|
-
#
|
307
|
+
# depending on the value. The only valid non-default value is 1,
|
308
|
+
# which enables image searching.
|
309
|
+
# Example:
|
310
|
+
# search_type: 1
|
275
311
|
# @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec, ::Hash]
|
276
312
|
# The query expansion specification that specifies the conditions under which
|
277
313
|
# query expansion occurs.
|
@@ -298,15 +334,17 @@ module Google
|
|
298
334
|
# @param embedding_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec, ::Hash]
|
299
335
|
# Uses the provided embedding to do additional semantic document retrieval.
|
300
336
|
# The retrieval is based on the dot product of
|
301
|
-
#
|
302
|
-
# embedding that is provided in
|
303
|
-
#
|
337
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#vector SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
|
338
|
+
# and the document embedding that is provided in
|
339
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
|
304
340
|
#
|
305
|
-
# If
|
306
|
-
#
|
341
|
+
# If
|
342
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
343
|
+
# is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][].
|
307
344
|
# @param ranking_expression [::String]
|
308
345
|
# The ranking expression controls the customized ranking on retrieval
|
309
|
-
# documents. This overrides
|
346
|
+
# documents. This overrides
|
347
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
|
310
348
|
# The ranking expression is a single function or multiple functions that are
|
311
349
|
# joint by "+".
|
312
350
|
# * ranking_expression = function, { " + ", function };
|
@@ -97,6 +97,17 @@ module Google
|
|
97
97
|
# @param data_store [String]
|
98
98
|
# @param serving_config [String]
|
99
99
|
#
|
100
|
+
# @overload serving_config_path(project:, location:, collection:, engine:, serving_config:)
|
101
|
+
# The resource will be in the following format:
|
102
|
+
#
|
103
|
+
# `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`
|
104
|
+
#
|
105
|
+
# @param project [String]
|
106
|
+
# @param location [String]
|
107
|
+
# @param collection [String]
|
108
|
+
# @param engine [String]
|
109
|
+
# @param serving_config [String]
|
110
|
+
#
|
100
111
|
# @return [::String]
|
101
112
|
def serving_config_path **args
|
102
113
|
resources = {
|
@@ -114,6 +125,14 @@ module Google
|
|
114
125
|
raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
|
115
126
|
|
116
127
|
"projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/servingConfigs/#{serving_config}"
|
128
|
+
end),
|
129
|
+
"collection:engine:location:project:serving_config" => (proc do |project:, location:, collection:, engine:, serving_config:|
|
130
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
131
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
132
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
133
|
+
raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/"
|
134
|
+
|
135
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/servingConfigs/#{serving_config}"
|
117
136
|
end)
|
118
137
|
}
|
119
138
|
|
@@ -186,13 +186,15 @@ module Google
|
|
186
186
|
# @param options [::Gapic::CallOptions, ::Hash]
|
187
187
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
188
188
|
#
|
189
|
-
# @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
|
189
|
+
# @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
|
190
190
|
# Pass arguments to `search` via keyword arguments. Note that at
|
191
191
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
192
192
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
193
193
|
#
|
194
194
|
# @param serving_config [::String]
|
195
195
|
# Required. The resource name of the Search serving config, such as
|
196
|
+
# `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
197
|
+
# or
|
196
198
|
# `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
197
199
|
# This field is used to identify the serving configuration name, set
|
198
200
|
# of models used to make the search.
|
@@ -236,11 +238,35 @@ module Google
|
|
236
238
|
# expression is case-sensitive.
|
237
239
|
#
|
238
240
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
241
|
+
#
|
242
|
+
# Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
243
|
+
# key property defined in the Vertex AI Search backend -- this mapping is
|
244
|
+
# defined by the customer in their schema. For example a media customer might
|
245
|
+
# have a field 'name' in their schema. In this case the filter would look
|
246
|
+
# like this: filter --> name:'ANY("king kong")'
|
247
|
+
#
|
248
|
+
# For more information about filtering including syntax and filter
|
249
|
+
# operators, see
|
250
|
+
# [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
251
|
+
# @param canonical_filter [::String]
|
252
|
+
# The default filter that is applied when a user performs a search without
|
253
|
+
# checking any filters on the search page.
|
254
|
+
#
|
255
|
+
# The filter applied to every search request when quality improvement such as
|
256
|
+
# query expansion is needed. In the case a query does not have a sufficient
|
257
|
+
# amount of results this filter will be used to determine whether or not to
|
258
|
+
# enable the query expansion flow. The original filter will still be used for
|
259
|
+
# the query expanded search.
|
260
|
+
# This field is strongly recommended to achieve high search quality.
|
261
|
+
#
|
262
|
+
# For more information about filter syntax, see
|
263
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#filter SearchRequest.filter}.
|
239
264
|
# @param order_by [::String]
|
240
265
|
# The order in which documents are returned. Documents can be ordered by
|
241
266
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
242
267
|
# object. Leave it unset if ordered by relevance. `order_by` expression is
|
243
|
-
# case-sensitive.
|
268
|
+
# case-sensitive. For more information on ordering, see
|
269
|
+
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
244
270
|
#
|
245
271
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
246
272
|
# @param user_info [::Google::Cloud::DiscoveryEngine::V1beta::UserInfo, ::Hash]
|
@@ -255,6 +281,8 @@ module Google
|
|
255
281
|
# error is returned.
|
256
282
|
# @param boost_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec, ::Hash]
|
257
283
|
# Boost specification to boost certain documents.
|
284
|
+
# For more information on boosting, see
|
285
|
+
# [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
258
286
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
259
287
|
# Additional search parameters.
|
260
288
|
#
|
@@ -262,9 +290,17 @@ module Google
|
|
262
290
|
#
|
263
291
|
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
264
292
|
# are restricted or boosted based on the location provided.
|
293
|
+
# Example:
|
294
|
+
# user_country_code: "au"
|
295
|
+
#
|
296
|
+
# For available codes see [Country
|
297
|
+
# Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
298
|
+
#
|
265
299
|
# * `search_type`: double. Default empty. Enables non-webpage searching
|
266
|
-
#
|
267
|
-
#
|
300
|
+
# depending on the value. The only valid non-default value is 1,
|
301
|
+
# which enables image searching.
|
302
|
+
# Example:
|
303
|
+
# search_type: 1
|
268
304
|
# @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec, ::Hash]
|
269
305
|
# The query expansion specification that specifies the conditions under which
|
270
306
|
# query expansion occurs.
|
@@ -291,15 +327,17 @@ module Google
|
|
291
327
|
# @param embedding_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec, ::Hash]
|
292
328
|
# Uses the provided embedding to do additional semantic document retrieval.
|
293
329
|
# The retrieval is based on the dot product of
|
294
|
-
#
|
295
|
-
# embedding that is provided in
|
296
|
-
#
|
330
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#vector SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
|
331
|
+
# and the document embedding that is provided in
|
332
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
|
297
333
|
#
|
298
|
-
# If
|
299
|
-
#
|
334
|
+
# If
|
335
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
336
|
+
# is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][].
|
300
337
|
# @param ranking_expression [::String]
|
301
338
|
# The ranking expression controls the customized ranking on retrieval
|
302
|
-
# documents. This overrides
|
339
|
+
# documents. This overrides
|
340
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
|
303
341
|
# The ranking expression is a single function or multiple functions that are
|
304
342
|
# joint by "+".
|
305
343
|
# * ranking_expression = function, { " + ", function };
|
@@ -126,6 +126,14 @@ module Google
|
|
126
126
|
["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
|
127
127
|
]
|
128
128
|
)
|
129
|
+
.with_bindings(
|
130
|
+
uri_method: :post,
|
131
|
+
uri_template: "/v1beta/{serving_config}:search",
|
132
|
+
body: "*",
|
133
|
+
matches: [
|
134
|
+
["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+/?$}, false]
|
135
|
+
]
|
136
|
+
)
|
129
137
|
transcoder.transcode request_pb
|
130
138
|
end
|
131
139
|
end
|