google-cloud-discovery_engine-v1beta 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +429 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +78 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +386 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +114 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +1107 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +908 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +518 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +486 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +135 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +443 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +840 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/paths.rb +127 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +680 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +513 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +465 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +116 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +638 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +768 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +131 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +542 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +905 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +250 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +7 -2
- data/lib/google/cloud/discovery_engine/v1beta.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +41 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +38 -0
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +43 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +58 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +81 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +109 -0
- data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +40 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +30 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +72 -0
- data/lib/google/cloud/discoveryengine/v1beta/schema_service_services_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +151 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +93 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +39 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +59 -0
- data/lib/google-cloud-discovery_engine-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/httpbody.rb +80 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +98 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +107 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +181 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +286 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +84 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +210 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema.rb +45 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +180 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +605 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +473 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +64 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/date.rb +53 -0
- metadata +254 -12
@@ -0,0 +1,605 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 DiscoveryEngine
|
23
|
+
module V1beta
|
24
|
+
# Request message for
|
25
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}
|
26
|
+
# method.
|
27
|
+
# @!attribute [rw] serving_config
|
28
|
+
# @return [::String]
|
29
|
+
# Required. The resource name of the Search serving config, such as
|
30
|
+
# `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
31
|
+
# This field is used to identify the serving configuration name, set
|
32
|
+
# of models used to make the search.
|
33
|
+
# @!attribute [rw] branch
|
34
|
+
# @return [::String]
|
35
|
+
# The branch resource name, such as
|
36
|
+
# `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
|
37
|
+
#
|
38
|
+
# Use `default_branch` as the branch ID or leave this field empty, to search
|
39
|
+
# documents under the default branch.
|
40
|
+
# @!attribute [rw] query
|
41
|
+
# @return [::String]
|
42
|
+
# Raw search query.
|
43
|
+
# @!attribute [rw] page_size
|
44
|
+
# @return [::Integer]
|
45
|
+
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
|
46
|
+
# to return. If unspecified, defaults to a reasonable value. The maximum
|
47
|
+
# allowed value is 100. Values above 100 will be coerced to 100.
|
48
|
+
#
|
49
|
+
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
50
|
+
# @!attribute [rw] page_token
|
51
|
+
# @return [::String]
|
52
|
+
# A page token received from a previous
|
53
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}
|
54
|
+
# call. Provide this to retrieve the subsequent page.
|
55
|
+
#
|
56
|
+
# When paginating, all other parameters provided to
|
57
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}
|
58
|
+
# must match the call that provided the page token. Otherwise, an
|
59
|
+
# `INVALID_ARGUMENT` error is returned.
|
60
|
+
# @!attribute [rw] offset
|
61
|
+
# @return [::Integer]
|
62
|
+
# A 0-indexed integer that specifies the current offset (that is, starting
|
63
|
+
# result location, amongst the
|
64
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s deemed by the API
|
65
|
+
# as relevant) in search results. This field is only considered if
|
66
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#page_token page_token}
|
67
|
+
# is unset.
|
68
|
+
#
|
69
|
+
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
70
|
+
# @!attribute [rw] filter
|
71
|
+
# @return [::String]
|
72
|
+
# The filter syntax consists of an expression language for constructing a
|
73
|
+
# predicate from one or more fields of the documents being filtered. Filter
|
74
|
+
# expression is case-sensitive.
|
75
|
+
#
|
76
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
77
|
+
# @!attribute [rw] order_by
|
78
|
+
# @return [::String]
|
79
|
+
# The order in which documents are returned. Document can be ordered by
|
80
|
+
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
81
|
+
# object. Leave it unset if ordered by relevance. OrderBy expression is
|
82
|
+
# case-sensitive.
|
83
|
+
#
|
84
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
85
|
+
# @!attribute [rw] user_info
|
86
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::UserInfo]
|
87
|
+
# Information about the end user.
|
88
|
+
# Highly recommended for analytics. The user_agent string in UserInfo will
|
89
|
+
# be used to deduce device_type for analytics.
|
90
|
+
# @!attribute [rw] facet_specs
|
91
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec>]
|
92
|
+
# Facet specifications for faceted search. If empty, no facets are returned.
|
93
|
+
#
|
94
|
+
# A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
95
|
+
# error is returned.
|
96
|
+
# @!attribute [rw] boost_spec
|
97
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec]
|
98
|
+
# Boost specification to boost certain documents.
|
99
|
+
# @!attribute [rw] params
|
100
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
|
101
|
+
# Additional search parameters.
|
102
|
+
#
|
103
|
+
# For
|
104
|
+
# [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH]
|
105
|
+
# vertical, supported values are:
|
106
|
+
#
|
107
|
+
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
108
|
+
# are restricted or boosted based on the location provided.
|
109
|
+
# * `search_type`: double. Default empty. Enables non-webpage searching
|
110
|
+
# depending on the value. The only valid non-default value is 1,
|
111
|
+
# which enables image searching.
|
112
|
+
# @!attribute [rw] query_expansion_spec
|
113
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec]
|
114
|
+
# The query expansion specification that specifies the conditions under which
|
115
|
+
# query expansion will occur.
|
116
|
+
# @!attribute [rw] spell_correction_spec
|
117
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::SpellCorrectionSpec]
|
118
|
+
# The spell correction specification that specifies the mode under
|
119
|
+
# which spell correction will take effect.
|
120
|
+
# @!attribute [rw] user_pseudo_id
|
121
|
+
# @return [::String]
|
122
|
+
# A unique identifier for tracking visitors. For example, this could be
|
123
|
+
# implemented with an HTTP cookie, which should be able to uniquely identify
|
124
|
+
# a visitor on a single device. This unique identifier should not change if
|
125
|
+
# the visitor logs in or out of the website.
|
126
|
+
#
|
127
|
+
# This field should NOT have a fixed value such as `unknown_visitor`.
|
128
|
+
#
|
129
|
+
# This should be the same identifier as
|
130
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent#user_pseudo_id UserEvent.user_pseudo_id}
|
131
|
+
# and
|
132
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryRequest#user_pseudo_id CompleteQueryRequest.user_pseudo_id}
|
133
|
+
#
|
134
|
+
# The field must be a UTF-8 encoded string with a length limit of 128
|
135
|
+
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
136
|
+
# @!attribute [rw] content_search_spec
|
137
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec]
|
138
|
+
# The content search spec that configs the desired behavior of content
|
139
|
+
# search.
|
140
|
+
# @!attribute [rw] safe_search
|
141
|
+
# @return [::Boolean]
|
142
|
+
# Whether to turn on safe search. This is only supported for
|
143
|
+
# [ContentConfig.PUBLIC_WEBSITE][].
|
144
|
+
# @!attribute [rw] user_labels
|
145
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
146
|
+
# The user labels applied to a resource must meet the following requirements:
|
147
|
+
#
|
148
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
149
|
+
# * Each label must be a key-value pair.
|
150
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
151
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
152
|
+
# length of 63 characters.
|
153
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
154
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
155
|
+
# international characters are allowed.
|
156
|
+
# * The key portion of a label must be unique. However, you can use the same
|
157
|
+
# key with multiple resources.
|
158
|
+
# * Keys must start with a lowercase letter or international character.
|
159
|
+
#
|
160
|
+
# See [Google Cloud
|
161
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
162
|
+
# for more details.
|
163
|
+
class SearchRequest
|
164
|
+
include ::Google::Protobuf::MessageExts
|
165
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
|
+
|
167
|
+
# A facet specification to perform faceted search.
|
168
|
+
# @!attribute [rw] facet_key
|
169
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey]
|
170
|
+
# Required. The facet key specification.
|
171
|
+
# @!attribute [rw] limit
|
172
|
+
# @return [::Integer]
|
173
|
+
# Maximum of facet values that should be returned for this facet. If
|
174
|
+
# unspecified, defaults to 20. The maximum allowed value is 300. Values
|
175
|
+
# above 300 will be coerced to 300.
|
176
|
+
#
|
177
|
+
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
178
|
+
# @!attribute [rw] excluded_filter_keys
|
179
|
+
# @return [::Array<::String>]
|
180
|
+
# List of keys to exclude when faceting.
|
181
|
+
#
|
182
|
+
#
|
183
|
+
# By default,
|
184
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
185
|
+
# is not excluded from the filter unless it is listed in this field.
|
186
|
+
#
|
187
|
+
# Listing a facet key in this field allows its values to appear as facet
|
188
|
+
# results, even when they are filtered out of search results. Using this
|
189
|
+
# field does not affect what search results are returned.
|
190
|
+
#
|
191
|
+
# For example, suppose there are 100 documents with the color facet "Red"
|
192
|
+
# and 200 documents with the color facet "Blue". A query containing the
|
193
|
+
# filter "color:ANY("Red")" and having "color" as
|
194
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
|
195
|
+
# would by default return only "Red" documents in the search results, and
|
196
|
+
# also return "Red" with count 100 as the only color facet. Although there
|
197
|
+
# are also blue documents available, "Blue" would not be shown as an
|
198
|
+
# available facet value.
|
199
|
+
#
|
200
|
+
# If "color" is listed in "excludedFilterKeys", then the query returns the
|
201
|
+
# facet values "Red" with count 100 and "Blue" with count 200, because the
|
202
|
+
# "color" key is now excluded from the filter. Because this field doesn't
|
203
|
+
# affect search results, the search results are still correctly filtered to
|
204
|
+
# return only "Red" documents.
|
205
|
+
#
|
206
|
+
# A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
207
|
+
# error is returned.
|
208
|
+
# @!attribute [rw] enable_dynamic_position
|
209
|
+
# @return [::Boolean]
|
210
|
+
# Enables dynamic position for this facet. If set to true, the position of
|
211
|
+
# this facet among all facets in the response is determined automatically.
|
212
|
+
# It will be ordered together with dynamic facets if dynamic
|
213
|
+
# facets is enabled. If set to false, the position of this facet in the
|
214
|
+
# response will be the same as in the request, and it will be ranked before
|
215
|
+
# the facets with dynamic position enable and all dynamic facets.
|
216
|
+
#
|
217
|
+
# For example, you may always want to have rating facet returned in
|
218
|
+
# the response, but it's not necessarily to always display the rating facet
|
219
|
+
# at the top. In that case, you can set enable_dynamic_position to true so
|
220
|
+
# that the position of rating facet in response will be determined
|
221
|
+
# automatically.
|
222
|
+
#
|
223
|
+
# Another example, assuming you have the following facets in the request:
|
224
|
+
#
|
225
|
+
# * "rating", enable_dynamic_position = true
|
226
|
+
#
|
227
|
+
# * "price", enable_dynamic_position = false
|
228
|
+
#
|
229
|
+
# * "brands", enable_dynamic_position = false
|
230
|
+
#
|
231
|
+
# And also you have a dynamic facets enable, which will generate a facet
|
232
|
+
# 'gender'. Then the final order of the facets in the response can be
|
233
|
+
# ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
|
234
|
+
# "rating") depends on how API orders "gender" and "rating" facets.
|
235
|
+
# However, notice that "price" and "brands" will always be
|
236
|
+
# ranked at 1st and 2nd position since their enable_dynamic_position are
|
237
|
+
# false.
|
238
|
+
class FacetSpec
|
239
|
+
include ::Google::Protobuf::MessageExts
|
240
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
241
|
+
|
242
|
+
# Specifies how a facet is computed.
|
243
|
+
# @!attribute [rw] key
|
244
|
+
# @return [::String]
|
245
|
+
# Required. Supported textual and numerical facet keys in
|
246
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} object, over
|
247
|
+
# which the facet values are computed. Facet key is case-sensitive.
|
248
|
+
# @!attribute [rw] intervals
|
249
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>]
|
250
|
+
# Set only if values should be bucketized into intervals. Must be set
|
251
|
+
# for facets with numerical values. Must not be set for facet with text
|
252
|
+
# values. Maximum number of intervals is 30.
|
253
|
+
# @!attribute [rw] restricted_values
|
254
|
+
# @return [::Array<::String>]
|
255
|
+
# Only get facet for the given restricted values. Only supported on
|
256
|
+
# textual fields. For example, suppose "category" has three values
|
257
|
+
# "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
|
258
|
+
# "restricted_values" to "Action > 2022", the "category" facet will only
|
259
|
+
# contain "Action > 2022". Only supported on textual fields. Maximum
|
260
|
+
# is 10.
|
261
|
+
# @!attribute [rw] prefixes
|
262
|
+
# @return [::Array<::String>]
|
263
|
+
# Only get facet values that start with the given string prefix. For
|
264
|
+
# example, suppose "category" has three values "Action > 2022",
|
265
|
+
# "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
|
266
|
+
# "category" facet will only contain "Action > 2022" and "Action > 2021".
|
267
|
+
# Only supported on textual fields. Maximum is 10.
|
268
|
+
# @!attribute [rw] contains
|
269
|
+
# @return [::Array<::String>]
|
270
|
+
# Only get facet values that contains the given strings. For example,
|
271
|
+
# suppose "category" has three values "Action > 2022",
|
272
|
+
# "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
273
|
+
# "category" facet will only contain "Action > 2022" and "Sci-Fi > 2022".
|
274
|
+
# Only supported on textual fields. Maximum is 10.
|
275
|
+
# @!attribute [rw] case_insensitive
|
276
|
+
# @return [::Boolean]
|
277
|
+
# True to make facet keys case insensitive when getting faceting
|
278
|
+
# values with prefixes or contains; false otherwise.
|
279
|
+
# @!attribute [rw] order_by
|
280
|
+
# @return [::String]
|
281
|
+
# The order in which documents are returned.
|
282
|
+
#
|
283
|
+
# Allowed values are:
|
284
|
+
#
|
285
|
+
# * "count desc", which means order by
|
286
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue#count SearchResponse.Facet.values.count}
|
287
|
+
# descending.
|
288
|
+
#
|
289
|
+
# * "value desc", which means order by
|
290
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue#value SearchResponse.Facet.values.value}
|
291
|
+
# descending.
|
292
|
+
# Only applies to textual facets.
|
293
|
+
#
|
294
|
+
# If not set, textual values are sorted in [natural
|
295
|
+
# order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
|
296
|
+
# intervals are sorted in the order given by
|
297
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals FacetSpec.FacetKey.intervals}.
|
298
|
+
class FacetKey
|
299
|
+
include ::Google::Protobuf::MessageExts
|
300
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# Boost specification to boost certain documents.
|
305
|
+
# @!attribute [rw] condition_boost_specs
|
306
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec::ConditionBoostSpec>]
|
307
|
+
# Condition boost specifications. If a document matches multiple conditions
|
308
|
+
# in the specifictions, boost scores from these specifications are all
|
309
|
+
# applied and combined in a non-linear way. Maximum number of
|
310
|
+
# specifications is 20.
|
311
|
+
class BoostSpec
|
312
|
+
include ::Google::Protobuf::MessageExts
|
313
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
314
|
+
|
315
|
+
# Boost applies to documents which match a condition.
|
316
|
+
# @!attribute [rw] condition
|
317
|
+
# @return [::String]
|
318
|
+
# An expression which specifies a boost condition. The syntax and
|
319
|
+
# supported fields are the same as a filter expression. See
|
320
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#filter SearchRequest.filter}
|
321
|
+
# for detail syntax and limitations.
|
322
|
+
#
|
323
|
+
# Examples:
|
324
|
+
#
|
325
|
+
# * To boost documents with document ID "doc_1" or "doc_2", and
|
326
|
+
# color
|
327
|
+
# "Red" or "Blue":
|
328
|
+
# * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
|
329
|
+
# @!attribute [rw] boost
|
330
|
+
# @return [::Float]
|
331
|
+
# Strength of the condition boost, which should be in [-1, 1]. Negative
|
332
|
+
# boost means demotion. Default is 0.0.
|
333
|
+
#
|
334
|
+
# Setting to 1.0 gives the document a big promotion. However, it does not
|
335
|
+
# necessarily mean that the boosted document will be the top result at
|
336
|
+
# all times, nor that other documents will be excluded. Results could
|
337
|
+
# still be shown even when none of them matches the condition. And
|
338
|
+
# results that are significantly more relevant to the search query can
|
339
|
+
# still trump your heavily favored but irrelevant documents.
|
340
|
+
#
|
341
|
+
# Setting to -1.0 gives the document a big demotion. However, results
|
342
|
+
# that are deeply relevant might still be shown. The document will have
|
343
|
+
# an upstream battle to get a fairly high ranking, but it is not blocked
|
344
|
+
# out completely.
|
345
|
+
#
|
346
|
+
# Setting to 0.0 means no boost applied. The boosting condition is
|
347
|
+
# ignored.
|
348
|
+
class ConditionBoostSpec
|
349
|
+
include ::Google::Protobuf::MessageExts
|
350
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
# Specification to determine under which conditions query expansion should
|
355
|
+
# occur.
|
356
|
+
# @!attribute [rw] condition
|
357
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec::Condition]
|
358
|
+
# The condition under which query expansion should occur. Default to
|
359
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
|
360
|
+
class QueryExpansionSpec
|
361
|
+
include ::Google::Protobuf::MessageExts
|
362
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
363
|
+
|
364
|
+
# Enum describing under which condition query expansion should occur.
|
365
|
+
module Condition
|
366
|
+
# Unspecified query expansion condition. In this case, server behavior
|
367
|
+
# defaults to
|
368
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
|
369
|
+
CONDITION_UNSPECIFIED = 0
|
370
|
+
|
371
|
+
# Disabled query expansion. Only the exact search query is used, even if
|
372
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#total_size SearchResponse.total_size}
|
373
|
+
# is zero.
|
374
|
+
DISABLED = 1
|
375
|
+
|
376
|
+
# Automatic query expansion built by the Search API.
|
377
|
+
AUTO = 2
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
381
|
+
# The specification for query spell correction.
|
382
|
+
# @!attribute [rw] mode
|
383
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::SpellCorrectionSpec::Mode]
|
384
|
+
# The mode under which spell correction should take effect to
|
385
|
+
# replace the original search query. Default to
|
386
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
387
|
+
class SpellCorrectionSpec
|
388
|
+
include ::Google::Protobuf::MessageExts
|
389
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
390
|
+
|
391
|
+
# Enum describing under which mode spell correction should occur.
|
392
|
+
module Mode
|
393
|
+
# Unspecified spell correction mode. In this case, server behavior
|
394
|
+
# defaults to
|
395
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
|
396
|
+
MODE_UNSPECIFIED = 0
|
397
|
+
|
398
|
+
# Search API will try to find a spell suggestion if there
|
399
|
+
# is any and put in the
|
400
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#corrected_query SearchResponse.corrected_query}.
|
401
|
+
# The spell suggestion will not be used as the search query.
|
402
|
+
SUGGESTION_ONLY = 1
|
403
|
+
|
404
|
+
# Automatic spell correction built by the Search API. Search will
|
405
|
+
# be based on the corrected query if found.
|
406
|
+
AUTO = 2
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
410
|
+
# The specification that configs the desired behavior of the UCS content
|
411
|
+
# search.
|
412
|
+
# @!attribute [rw] snippet_spec
|
413
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SnippetSpec]
|
414
|
+
# If there is no snippet spec provided, there will be no snippet in the
|
415
|
+
# search result.
|
416
|
+
# @!attribute [rw] summary_spec
|
417
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec]
|
418
|
+
# If there is no summary spec provided, there will be no summary in the
|
419
|
+
# search response.
|
420
|
+
class ContentSearchSpec
|
421
|
+
include ::Google::Protobuf::MessageExts
|
422
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
423
|
+
|
424
|
+
# The specification that configs the snippet in the search results.
|
425
|
+
# @!attribute [rw] max_snippet_count
|
426
|
+
# @return [::Integer]
|
427
|
+
# Max number of snippets returned in each search result.
|
428
|
+
# If the matching snippets is less than the max_snippet_count, return all
|
429
|
+
# of the snippets; otherwise, return the max_snippet_count.
|
430
|
+
#
|
431
|
+
# At most 5 snippets will be returned for each SearchResult.
|
432
|
+
# @!attribute [rw] reference_only
|
433
|
+
# @return [::Boolean]
|
434
|
+
# if true, only snippet reference is returned.
|
435
|
+
class SnippetSpec
|
436
|
+
include ::Google::Protobuf::MessageExts
|
437
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
438
|
+
end
|
439
|
+
|
440
|
+
# The specification that configs the summary in the search response.
|
441
|
+
# @!attribute [rw] summary_result_count
|
442
|
+
# @return [::Integer]
|
443
|
+
# The number of top results the summary should be generated from.
|
444
|
+
# If the number of returned results is less than summary_result_count,
|
445
|
+
# then the summary would be derived from all the results; otherwise, the
|
446
|
+
# summary would be derived from the top results.
|
447
|
+
#
|
448
|
+
# At most 5 results can be used for generating summary.
|
449
|
+
class SummarySpec
|
450
|
+
include ::Google::Protobuf::MessageExts
|
451
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# @!attribute [rw] key
|
456
|
+
# @return [::String]
|
457
|
+
# @!attribute [rw] value
|
458
|
+
# @return [::Google::Protobuf::Value]
|
459
|
+
class ParamsEntry
|
460
|
+
include ::Google::Protobuf::MessageExts
|
461
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
462
|
+
end
|
463
|
+
|
464
|
+
# @!attribute [rw] key
|
465
|
+
# @return [::String]
|
466
|
+
# @!attribute [rw] value
|
467
|
+
# @return [::String]
|
468
|
+
class UserLabelsEntry
|
469
|
+
include ::Google::Protobuf::MessageExts
|
470
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
471
|
+
end
|
472
|
+
end
|
473
|
+
|
474
|
+
# Response message for
|
475
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}
|
476
|
+
# method.
|
477
|
+
# @!attribute [rw] results
|
478
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult>]
|
479
|
+
# A list of matched documents. The order represents the ranking.
|
480
|
+
# @!attribute [rw] facets
|
481
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet>]
|
482
|
+
# Results of facets requested by user.
|
483
|
+
# @!attribute [rw] guided_search_result
|
484
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult]
|
485
|
+
# Guided search result.
|
486
|
+
# @!attribute [rw] total_size
|
487
|
+
# @return [::Integer]
|
488
|
+
# The estimated total count of matched items irrespective of pagination. The
|
489
|
+
# count of
|
490
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#results results}
|
491
|
+
# returned by pagination may be less than the
|
492
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#total_size total_size}
|
493
|
+
# that matches.
|
494
|
+
# @!attribute [rw] attribution_token
|
495
|
+
# @return [::String]
|
496
|
+
# A unique search token. This should be included in the
|
497
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent UserEvent} logs resulting
|
498
|
+
# from this search, which enables accurate attribution of search model
|
499
|
+
# performance.
|
500
|
+
# @!attribute [rw] next_page_token
|
501
|
+
# @return [::String]
|
502
|
+
# A token that can be sent as
|
503
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#page_token SearchRequest.page_token}
|
504
|
+
# to retrieve the next page. If this field is omitted, there are no
|
505
|
+
# subsequent pages.
|
506
|
+
# @!attribute [rw] corrected_query
|
507
|
+
# @return [::String]
|
508
|
+
# Contains the spell corrected query, if found. If the spell correction type
|
509
|
+
# is AUTOMATIC, then the search results are based on corrected_query.
|
510
|
+
# Otherwise the original query is used for search.
|
511
|
+
# @!attribute [rw] summary
|
512
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary]
|
513
|
+
# A summary as part of the search results.
|
514
|
+
# This field is only returned if
|
515
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec#summary_spec SearchRequest.ContentSearchSpec.summary_spec}
|
516
|
+
# is set.
|
517
|
+
# @!attribute [rw] applied_controls
|
518
|
+
# @return [::Array<::String>]
|
519
|
+
# Controls applied as part of the Control service.
|
520
|
+
class SearchResponse
|
521
|
+
include ::Google::Protobuf::MessageExts
|
522
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
523
|
+
|
524
|
+
# Represents the search results.
|
525
|
+
# @!attribute [rw] id
|
526
|
+
# @return [::String]
|
527
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id} of the
|
528
|
+
# searched {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}.
|
529
|
+
# @!attribute [rw] document
|
530
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
|
531
|
+
# The document data snippet in the search response. Only fields that are
|
532
|
+
# marked as retrievable are populated.
|
533
|
+
class SearchResult
|
534
|
+
include ::Google::Protobuf::MessageExts
|
535
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
536
|
+
end
|
537
|
+
|
538
|
+
# A facet result.
|
539
|
+
# @!attribute [rw] key
|
540
|
+
# @return [::String]
|
541
|
+
# The key for this facet. E.g., "colors" or "price". It matches
|
542
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}.
|
543
|
+
# @!attribute [rw] values
|
544
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Facet::FacetValue>]
|
545
|
+
# The facet values for this field.
|
546
|
+
# @!attribute [rw] dynamic_facet
|
547
|
+
# @return [::Boolean]
|
548
|
+
# Whether the facet is dynamically generated.
|
549
|
+
class Facet
|
550
|
+
include ::Google::Protobuf::MessageExts
|
551
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
552
|
+
|
553
|
+
# A facet value which contains value names and their count.
|
554
|
+
# @!attribute [rw] value
|
555
|
+
# @return [::String]
|
556
|
+
# Text value of a facet, such as "Black" for facet "colors".
|
557
|
+
# @!attribute [rw] interval
|
558
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Interval]
|
559
|
+
# Interval value for a facet, such as [10, 20) for facet "price". It
|
560
|
+
# matches
|
561
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}.
|
562
|
+
# @!attribute [rw] count
|
563
|
+
# @return [::Integer]
|
564
|
+
# Number of items that have this facet value.
|
565
|
+
class FacetValue
|
566
|
+
include ::Google::Protobuf::MessageExts
|
567
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
568
|
+
end
|
569
|
+
end
|
570
|
+
|
571
|
+
# Guided search result. The guided search helps user to refine the search
|
572
|
+
# results and narrow down to the real needs from a broaded search results.
|
573
|
+
# @!attribute [rw] refinement_attributes
|
574
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
|
575
|
+
# A list of ranked refinement attributes.
|
576
|
+
class GuidedSearchResult
|
577
|
+
include ::Google::Protobuf::MessageExts
|
578
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
579
|
+
|
580
|
+
# Useful attribute for search result refinements.
|
581
|
+
# @!attribute [rw] attribute_key
|
582
|
+
# @return [::String]
|
583
|
+
# Attribute key used to refine the results e.g. 'movie_type'.
|
584
|
+
# @!attribute [rw] attribute_value
|
585
|
+
# @return [::String]
|
586
|
+
# Attribute value used to refine the results e.g. 'drama'.
|
587
|
+
class RefinementAttribute
|
588
|
+
include ::Google::Protobuf::MessageExts
|
589
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
# Summary of the top N search result specified by the summary spec.
|
594
|
+
# @!attribute [rw] summary_text
|
595
|
+
# @return [::String]
|
596
|
+
# The summary content.
|
597
|
+
class Summary
|
598
|
+
include ::Google::Protobuf::MessageExts
|
599
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
600
|
+
end
|
601
|
+
end
|
602
|
+
end
|
603
|
+
end
|
604
|
+
end
|
605
|
+
end
|