@google-cloud/discoveryengine 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/README.md +33 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
- package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +22864 -6680
- package/build/protos/protos.js +57205 -16191
- package/build/protos/protos.json +5548 -1224
- package/build/src/index.d.ts +6 -1
- package/build/src/index.js +7 -1
- package/build/src/v1/completion_service_client.d.ts +156 -6
- package/build/src/v1/completion_service_client.js +188 -4
- package/build/src/v1/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1/conversational_search_service_client.js +1205 -0
- package/build/src/v1/conversational_search_service_client_config.json +68 -0
- package/build/src/v1/document_service_client.d.ts +165 -18
- package/build/src/v1/document_service_client.js +215 -11
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/schema_service_client.d.ts +148 -4
- package/build/src/v1/schema_service_client.js +207 -5
- package/build/src/v1/search_service_client.d.ts +238 -28
- package/build/src/v1/search_service_client.js +248 -20
- package/build/src/v1/user_event_service_client.d.ts +153 -9
- package/build/src/v1/user_event_service_client.js +207 -5
- package/build/src/v1alpha/completion_service_client.d.ts +603 -0
- package/build/src/v1alpha/completion_service_client.js +843 -0
- package/build/src/v1alpha/completion_service_client_config.json +43 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
- package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
- package/build/src/v1alpha/document_service_client.d.ts +1140 -0
- package/build/src/v1alpha/document_service_client.js +1393 -0
- package/build/src/v1alpha/document_service_client_config.json +82 -0
- package/build/src/v1alpha/index.d.ts +8 -0
- package/build/src/v1alpha/index.js +37 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
- package/build/src/v1alpha/recommendation_service_client.js +938 -0
- package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
- package/build/src/v1alpha/schema_service_client.d.ts +935 -0
- package/build/src/v1alpha/schema_service_client.js +1327 -0
- package/build/src/v1alpha/schema_service_client_config.json +63 -0
- package/build/src/v1alpha/search_service_client.d.ts +1208 -0
- package/build/src/v1alpha/search_service_client.js +1432 -0
- package/build/src/v1alpha/search_service_client_config.json +43 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
- package/build/src/v1alpha/user_event_service_client.js +1174 -0
- package/build/src/v1alpha/user_event_service_client_config.json +67 -0
- package/build/src/v1beta/completion_service_client.d.ts +55 -4
- package/build/src/v1beta/completion_service_client.js +60 -4
- package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
- package/build/src/v1beta/conversational_search_service_client.js +60 -4
- package/build/src/v1beta/document_service_client.d.ts +55 -4
- package/build/src/v1beta/document_service_client.js +61 -5
- package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
- package/build/src/v1beta/recommendation_service_client.js +60 -4
- package/build/src/v1beta/schema_service_client.d.ts +55 -4
- package/build/src/v1beta/schema_service_client.js +61 -5
- package/build/src/v1beta/search_service_client.d.ts +142 -4
- package/build/src/v1beta/search_service_client.js +118 -4
- package/build/src/v1beta/user_event_service_client.d.ts +55 -4
- package/build/src/v1beta/user_event_service_client.js +61 -5
- package/package.json +5 -5
@@ -56,6 +56,190 @@ service SearchService {
|
|
56
56
|
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
57
57
|
// method.
|
58
58
|
message SearchRequest {
|
59
|
+
// Specifies the image query input.
|
60
|
+
message ImageQuery {
|
61
|
+
oneof image {
|
62
|
+
// Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
|
63
|
+
// BMP.
|
64
|
+
string image_bytes = 1;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// A facet specification to perform faceted search.
|
69
|
+
message FacetSpec {
|
70
|
+
// Specifies how a facet is computed.
|
71
|
+
message FacetKey {
|
72
|
+
// Required. Supported textual and numerical facet keys in
|
73
|
+
// [Document][google.cloud.discoveryengine.v1.Document] object, over which
|
74
|
+
// the facet values are computed. Facet key is case-sensitive.
|
75
|
+
string key = 1 [(google.api.field_behavior) = REQUIRED];
|
76
|
+
|
77
|
+
// Set only if values should be bucketed into intervals. Must be set
|
78
|
+
// for facets with numerical values. Must not be set for facet with text
|
79
|
+
// values. Maximum number of intervals is 30.
|
80
|
+
repeated Interval intervals = 2;
|
81
|
+
|
82
|
+
// Only get facet for the given restricted values. Only supported on
|
83
|
+
// textual fields. For example, suppose "category" has three values
|
84
|
+
// "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
|
85
|
+
// "restricted_values" to "Action > 2022", the "category" facet only
|
86
|
+
// contains "Action > 2022". Only supported on textual fields. Maximum
|
87
|
+
// is 10.
|
88
|
+
repeated string restricted_values = 3;
|
89
|
+
|
90
|
+
// Only get facet values that start with the given string prefix. For
|
91
|
+
// example, suppose "category" has three values "Action > 2022",
|
92
|
+
// "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
|
93
|
+
// "category" facet only contains "Action > 2022" and "Action > 2021".
|
94
|
+
// Only supported on textual fields. Maximum is 10.
|
95
|
+
repeated string prefixes = 4;
|
96
|
+
|
97
|
+
// Only get facet values that contains the given strings. For example,
|
98
|
+
// suppose "category" has three values "Action > 2022",
|
99
|
+
// "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
100
|
+
// "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
|
101
|
+
// Only supported on textual fields. Maximum is 10.
|
102
|
+
repeated string contains = 5;
|
103
|
+
|
104
|
+
// True to make facet keys case insensitive when getting faceting
|
105
|
+
// values with prefixes or contains; false otherwise.
|
106
|
+
bool case_insensitive = 6;
|
107
|
+
|
108
|
+
// The order in which documents are returned.
|
109
|
+
//
|
110
|
+
// Allowed values are:
|
111
|
+
//
|
112
|
+
// * "count desc", which means order by
|
113
|
+
// [SearchResponse.Facet.values.count][google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue.count]
|
114
|
+
// descending.
|
115
|
+
//
|
116
|
+
// * "value desc", which means order by
|
117
|
+
// [SearchResponse.Facet.values.value][google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue.value]
|
118
|
+
// descending.
|
119
|
+
// Only applies to textual facets.
|
120
|
+
//
|
121
|
+
// If not set, textual values are sorted in [natural
|
122
|
+
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
|
123
|
+
// intervals are sorted in the order given by
|
124
|
+
// [FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.intervals].
|
125
|
+
string order_by = 7;
|
126
|
+
}
|
127
|
+
|
128
|
+
// Required. The facet key specification.
|
129
|
+
FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED];
|
130
|
+
|
131
|
+
// Maximum of facet values that should be returned for this facet. If
|
132
|
+
// unspecified, defaults to 20. The maximum allowed value is 300. Values
|
133
|
+
// above 300 are coerced to 300.
|
134
|
+
//
|
135
|
+
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
136
|
+
int32 limit = 2;
|
137
|
+
|
138
|
+
// List of keys to exclude when faceting.
|
139
|
+
//
|
140
|
+
//
|
141
|
+
// By default,
|
142
|
+
// [FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key]
|
143
|
+
// is not excluded from the filter unless it is listed in this field.
|
144
|
+
//
|
145
|
+
// Listing a facet key in this field allows its values to appear as facet
|
146
|
+
// results, even when they are filtered out of search results. Using this
|
147
|
+
// field does not affect what search results are returned.
|
148
|
+
//
|
149
|
+
// For example, suppose there are 100 documents with the color facet "Red"
|
150
|
+
// and 200 documents with the color facet "Blue". A query containing the
|
151
|
+
// filter "color:ANY("Red")" and having "color" as
|
152
|
+
// [FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key]
|
153
|
+
// would by default return only "Red" documents in the search results, and
|
154
|
+
// also return "Red" with count 100 as the only color facet. Although there
|
155
|
+
// are also blue documents available, "Blue" would not be shown as an
|
156
|
+
// available facet value.
|
157
|
+
//
|
158
|
+
// If "color" is listed in "excludedFilterKeys", then the query returns the
|
159
|
+
// facet values "Red" with count 100 and "Blue" with count 200, because the
|
160
|
+
// "color" key is now excluded from the filter. Because this field doesn't
|
161
|
+
// affect search results, the search results are still correctly filtered to
|
162
|
+
// return only "Red" documents.
|
163
|
+
//
|
164
|
+
// A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
165
|
+
// error is returned.
|
166
|
+
repeated string excluded_filter_keys = 3;
|
167
|
+
|
168
|
+
// Enables dynamic position for this facet. If set to true, the position of
|
169
|
+
// this facet among all facets in the response is determined automatically.
|
170
|
+
// If dynamic facets are enabled, it is ordered together.
|
171
|
+
// If set to false, the position of this facet in the
|
172
|
+
// response is the same as in the request, and it is ranked before
|
173
|
+
// the facets with dynamic position enable and all dynamic facets.
|
174
|
+
//
|
175
|
+
// For example, you may always want to have rating facet returned in
|
176
|
+
// the response, but it's not necessarily to always display the rating facet
|
177
|
+
// at the top. In that case, you can set enable_dynamic_position to true so
|
178
|
+
// that the position of rating facet in response is determined
|
179
|
+
// automatically.
|
180
|
+
//
|
181
|
+
// Another example, assuming you have the following facets in the request:
|
182
|
+
//
|
183
|
+
// * "rating", enable_dynamic_position = true
|
184
|
+
//
|
185
|
+
// * "price", enable_dynamic_position = false
|
186
|
+
//
|
187
|
+
// * "brands", enable_dynamic_position = false
|
188
|
+
//
|
189
|
+
// And also you have a dynamic facets enabled, which generates a facet
|
190
|
+
// `gender`. Then the final order of the facets in the response can be
|
191
|
+
// ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
|
192
|
+
// "rating") depends on how API orders "gender" and "rating" facets.
|
193
|
+
// However, notice that "price" and "brands" are always
|
194
|
+
// ranked at first and second position because their enable_dynamic_position
|
195
|
+
// is false.
|
196
|
+
bool enable_dynamic_position = 4;
|
197
|
+
}
|
198
|
+
|
199
|
+
// Boost specification to boost certain documents.
|
200
|
+
message BoostSpec {
|
201
|
+
// Boost applies to documents which match a condition.
|
202
|
+
message ConditionBoostSpec {
|
203
|
+
// An expression which specifies a boost condition. The syntax and
|
204
|
+
// supported fields are the same as a filter expression. See
|
205
|
+
// [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter]
|
206
|
+
// for detail syntax and limitations.
|
207
|
+
//
|
208
|
+
// Examples:
|
209
|
+
//
|
210
|
+
// * To boost documents with document ID "doc_1" or "doc_2", and
|
211
|
+
// color
|
212
|
+
// "Red" or "Blue":
|
213
|
+
// * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
|
214
|
+
string condition = 1;
|
215
|
+
|
216
|
+
// Strength of the condition boost, which should be in [-1, 1]. Negative
|
217
|
+
// boost means demotion. Default is 0.0.
|
218
|
+
//
|
219
|
+
// Setting to 1.0 gives the document a big promotion. However, it does not
|
220
|
+
// necessarily mean that the boosted document will be the top result at
|
221
|
+
// all times, nor that other documents will be excluded. Results could
|
222
|
+
// still be shown even when none of them matches the condition. And
|
223
|
+
// results that are significantly more relevant to the search query can
|
224
|
+
// still trump your heavily favored but irrelevant documents.
|
225
|
+
//
|
226
|
+
// Setting to -1.0 gives the document a big demotion. However, results
|
227
|
+
// that are deeply relevant might still be shown. The document will have
|
228
|
+
// an upstream battle to get a fairly high ranking, but it is not blocked
|
229
|
+
// out completely.
|
230
|
+
//
|
231
|
+
// Setting to 0.0 means no boost applied. The boosting condition is
|
232
|
+
// ignored.
|
233
|
+
float boost = 2;
|
234
|
+
}
|
235
|
+
|
236
|
+
// Condition boost specifications. If a document matches multiple conditions
|
237
|
+
// in the specifictions, boost scores from these specifications are all
|
238
|
+
// applied and combined in a non-linear way. Maximum number of
|
239
|
+
// specifications is 20.
|
240
|
+
repeated ConditionBoostSpec condition_boost_specs = 1;
|
241
|
+
}
|
242
|
+
|
59
243
|
// Specification to determine under which conditions query expansion should
|
60
244
|
// occur.
|
61
245
|
message QueryExpansionSpec {
|
@@ -78,6 +262,11 @@ message SearchRequest {
|
|
78
262
|
// The condition under which query expansion should occur. Default to
|
79
263
|
// [Condition.DISABLED][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
|
80
264
|
Condition condition = 1;
|
265
|
+
|
266
|
+
// Whether to pin unexpanded results. If this field is set to true,
|
267
|
+
// unexpanded products are always at the top of the search results, followed
|
268
|
+
// by the expanded results.
|
269
|
+
bool pin_unexpanded_results = 2;
|
81
270
|
}
|
82
271
|
|
83
272
|
// The specification for query spell correction.
|
@@ -106,25 +295,91 @@ message SearchRequest {
|
|
106
295
|
Mode mode = 1;
|
107
296
|
}
|
108
297
|
|
109
|
-
//
|
110
|
-
// search.
|
298
|
+
// A specification for configuring the behavior of content search.
|
111
299
|
message ContentSearchSpec {
|
112
|
-
//
|
300
|
+
// A specification for configuring snippets in a search response.
|
113
301
|
message SnippetSpec {
|
114
|
-
//
|
115
|
-
//
|
116
|
-
//
|
302
|
+
// [DEPRECATED] This field is deprecated. To control snippet return, use
|
303
|
+
// `return_snippet` field. For backwards compatibility, we will return
|
304
|
+
// snippet if max_snippet_count > 0.
|
305
|
+
int32 max_snippet_count = 1 [deprecated = true];
|
306
|
+
|
307
|
+
// [DEPRECATED] This field is deprecated and will have no affect on the
|
308
|
+
// snippet.
|
309
|
+
bool reference_only = 2 [deprecated = true];
|
310
|
+
|
311
|
+
// If `true`, then return snippet. If no snippet can be generated, we
|
312
|
+
// return "No snippet is available for this page." A `snippet_status` with
|
313
|
+
// `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
|
314
|
+
bool return_snippet = 3;
|
315
|
+
}
|
316
|
+
|
317
|
+
// A specification for configuring a summary returned in a search
|
318
|
+
// response.
|
319
|
+
message SummarySpec {
|
320
|
+
// The number of top results to generate the summary from. If the number
|
321
|
+
// of results returned is less than `summaryResultCount`, the summary is
|
322
|
+
// generated from all of the results.
|
117
323
|
//
|
118
|
-
// At most
|
119
|
-
int32
|
324
|
+
// At most five results can be used to generate a summary.
|
325
|
+
int32 summary_result_count = 1;
|
120
326
|
|
121
|
-
//
|
122
|
-
|
327
|
+
// Specifies whether to include citations in the summary. The default
|
328
|
+
// value is `false`.
|
329
|
+
//
|
330
|
+
// When this field is set to `true`, summaries include in-line citation
|
331
|
+
// numbers.
|
332
|
+
//
|
333
|
+
// Example summary including citations:
|
334
|
+
//
|
335
|
+
// BigQuery is Google Cloud's fully managed and completely serverless
|
336
|
+
// enterprise data warehouse [1]. BigQuery supports all data types, works
|
337
|
+
// across clouds, and has built-in machine learning and business
|
338
|
+
// intelligence, all within a unified platform [2, 3].
|
339
|
+
//
|
340
|
+
// The citation numbers refer to the returned search results and are
|
341
|
+
// 1-indexed. For example, [1] means that the sentence is attributed to
|
342
|
+
// the first search result. [2, 3] means that the sentence is attributed
|
343
|
+
// to both the second and third search results.
|
344
|
+
bool include_citations = 2;
|
345
|
+
|
346
|
+
// Specifies whether to filter out adversarial queries. The default value
|
347
|
+
// is `false`.
|
348
|
+
//
|
349
|
+
// Google employs search-query classification to detect adversarial
|
350
|
+
// queries. No summary is returned if the search query is classified as an
|
351
|
+
// adversarial query. For example, a user might ask a question regarding
|
352
|
+
// negative comments about the company or submit a query designed to
|
353
|
+
// generate unsafe, policy-violating output. If this field is set to
|
354
|
+
// `true`, we skip generating summaries for adversarial queries and return
|
355
|
+
// fallback messages instead.
|
356
|
+
bool ignore_adversarial_query = 3;
|
357
|
+
|
358
|
+
// Specifies whether to filter out queries that are not summary-seeking.
|
359
|
+
// The default value is `false`.
|
360
|
+
//
|
361
|
+
// Google employs search-query classification to detect summary-seeking
|
362
|
+
// queries. No summary is returned if the search query is classified as a
|
363
|
+
// non-summary seeking query. For example, `why is the sky blue` and `Who
|
364
|
+
// is the best soccer player in the world?` are summary-seeking queries,
|
365
|
+
// but `SFO airport` and `world cup 2026` are not. They are most likely
|
366
|
+
// navigational queries. If this field is set to `true`, we skip
|
367
|
+
// generating summaries for non-summary seeking queries and return
|
368
|
+
// fallback messages instead.
|
369
|
+
bool ignore_non_summary_seeking_query = 4;
|
370
|
+
|
371
|
+
// Language code for Summary. Use language tags defined by
|
372
|
+
// [BCP47][https://www.rfc-editor.org/rfc/bcp/bcp47.txt].
|
373
|
+
string language_code = 6;
|
123
374
|
}
|
124
375
|
|
125
|
-
// If
|
126
|
-
// search
|
376
|
+
// If `snippetSpec` is not specified, snippets are not included in the
|
377
|
+
// search response.
|
127
378
|
SnippetSpec snippet_spec = 1;
|
379
|
+
|
380
|
+
// If `summarySpec` is not specified, summaries are not included in the
|
381
|
+
// search response.
|
382
|
+
SummarySpec summary_spec = 2;
|
128
383
|
}
|
129
384
|
|
130
385
|
// Required. The resource name of the Search serving config, such as
|
@@ -150,9 +405,12 @@ message SearchRequest {
|
|
150
405
|
// Raw search query.
|
151
406
|
string query = 3;
|
152
407
|
|
408
|
+
// Raw image query.
|
409
|
+
ImageQuery image_query = 19;
|
410
|
+
|
153
411
|
// Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to
|
154
412
|
// return. If unspecified, defaults to a reasonable value. The maximum allowed
|
155
|
-
// value is 100. Values above 100
|
413
|
+
// value is 100. Values above 100 are coerced to 100.
|
156
414
|
//
|
157
415
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
158
416
|
int32 page_size = 4;
|
@@ -177,11 +435,36 @@ message SearchRequest {
|
|
177
435
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
178
436
|
int32 offset = 6;
|
179
437
|
|
438
|
+
// The filter syntax consists of an expression language for constructing a
|
439
|
+
// predicate from one or more fields of the documents being filtered. Filter
|
440
|
+
// expression is case-sensitive.
|
441
|
+
//
|
442
|
+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
443
|
+
string filter = 7;
|
444
|
+
|
445
|
+
// The order in which documents are returned. Documents can be ordered by
|
446
|
+
// a field in an [Document][google.cloud.discoveryengine.v1.Document] object.
|
447
|
+
// Leave it unset if ordered by relevance. `order_by` expression is
|
448
|
+
// case-sensitive.
|
449
|
+
//
|
450
|
+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
451
|
+
string order_by = 8;
|
452
|
+
|
180
453
|
// Information about the end user.
|
181
|
-
// Highly recommended for analytics.
|
182
|
-
//
|
454
|
+
// Highly recommended for analytics.
|
455
|
+
// [UserInfo.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent]
|
456
|
+
// is used to deduce `device_type` for analytics.
|
183
457
|
UserInfo user_info = 21;
|
184
458
|
|
459
|
+
// Facet specifications for faceted search. If empty, no facets are returned.
|
460
|
+
//
|
461
|
+
// A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
462
|
+
// error is returned.
|
463
|
+
repeated FacetSpec facet_specs = 9;
|
464
|
+
|
465
|
+
// Boost specification to boost certain documents.
|
466
|
+
BoostSpec boost_spec = 10;
|
467
|
+
|
185
468
|
// Additional search parameters.
|
186
469
|
//
|
187
470
|
// For public website search only, supported values are:
|
@@ -194,11 +477,11 @@ message SearchRequest {
|
|
194
477
|
map<string, google.protobuf.Value> params = 11;
|
195
478
|
|
196
479
|
// The query expansion specification that specifies the conditions under which
|
197
|
-
// query expansion
|
480
|
+
// query expansion occurs.
|
198
481
|
QueryExpansionSpec query_expansion_spec = 13;
|
199
482
|
|
200
483
|
// The spell correction specification that specifies the mode under
|
201
|
-
// which spell correction
|
484
|
+
// which spell correction takes effect.
|
202
485
|
SpellCorrectionSpec spell_correction_spec = 14;
|
203
486
|
|
204
487
|
// A unique identifier for tracking visitors. For example, this could be
|
@@ -217,12 +500,11 @@ message SearchRequest {
|
|
217
500
|
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
218
501
|
string user_pseudo_id = 15;
|
219
502
|
|
220
|
-
//
|
221
|
-
// search.
|
503
|
+
// A specification for configuring the behavior of content search.
|
222
504
|
ContentSearchSpec content_search_spec = 24;
|
223
505
|
|
224
506
|
// Whether to turn on safe search. This is only supported for
|
225
|
-
//
|
507
|
+
// website search.
|
226
508
|
bool safe_search = 20;
|
227
509
|
|
228
510
|
// The user labels applied to a resource must meet the following requirements:
|
@@ -260,9 +542,118 @@ message SearchResponse {
|
|
260
542
|
Document document = 2;
|
261
543
|
}
|
262
544
|
|
545
|
+
// A facet result.
|
546
|
+
message Facet {
|
547
|
+
// A facet value which contains value names and their count.
|
548
|
+
message FacetValue {
|
549
|
+
// A facet value which contains values.
|
550
|
+
oneof facet_value {
|
551
|
+
// Text value of a facet, such as "Black" for facet "colors".
|
552
|
+
string value = 1;
|
553
|
+
|
554
|
+
// Interval value for a facet, such as [10, 20) for facet "price". It
|
555
|
+
// matches
|
556
|
+
// [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.intervals].
|
557
|
+
Interval interval = 2;
|
558
|
+
}
|
559
|
+
|
560
|
+
// Number of items that have this facet value.
|
561
|
+
int64 count = 3;
|
562
|
+
}
|
563
|
+
|
564
|
+
// The key for this facet. E.g., "colors" or "price". It matches
|
565
|
+
// [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key].
|
566
|
+
string key = 1;
|
567
|
+
|
568
|
+
// The facet values for this field.
|
569
|
+
repeated FacetValue values = 2;
|
570
|
+
|
571
|
+
// Whether the facet is dynamically generated.
|
572
|
+
bool dynamic_facet = 3;
|
573
|
+
}
|
574
|
+
|
575
|
+
// Summary of the top N search result specified by the summary spec.
|
576
|
+
message Summary {
|
577
|
+
// Safety Attribute categories and their associated confidence scores.
|
578
|
+
message SafetyAttributes {
|
579
|
+
// The display names of Safety Attribute categories associated with the
|
580
|
+
// generated content. Order matches the Scores.
|
581
|
+
repeated string categories = 1;
|
582
|
+
|
583
|
+
// The confidence scores of the each category, higher
|
584
|
+
// value means higher confidence. Order matches the Categories.
|
585
|
+
repeated float scores = 2;
|
586
|
+
}
|
587
|
+
|
588
|
+
// An Enum for summary-skipped reasons.
|
589
|
+
enum SummarySkippedReason {
|
590
|
+
// Default value. The summary skipped reason is not specified.
|
591
|
+
SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0;
|
592
|
+
|
593
|
+
// The adversarial query ignored case.
|
594
|
+
//
|
595
|
+
// Only populated when
|
596
|
+
// [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
|
597
|
+
// is set to `true`.
|
598
|
+
ADVERSARIAL_QUERY_IGNORED = 1;
|
599
|
+
|
600
|
+
// The non-summary seeking query ignored case.
|
601
|
+
//
|
602
|
+
// Only populated when
|
603
|
+
// [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
|
604
|
+
// is set to `true`.
|
605
|
+
NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
|
606
|
+
|
607
|
+
// The out-of-domain query ignored case.
|
608
|
+
//
|
609
|
+
// Google skips the summary if there are no high-relevance search results.
|
610
|
+
// For example, the data store contains facts about company A but the
|
611
|
+
// user query is asking questions about company B.
|
612
|
+
OUT_OF_DOMAIN_QUERY_IGNORED = 3;
|
613
|
+
|
614
|
+
// The potential policy violation case.
|
615
|
+
//
|
616
|
+
// Google skips the summary if there is a potential policy violation
|
617
|
+
// detected. This includes content that may be violent or toxic.
|
618
|
+
POTENTIAL_POLICY_VIOLATION = 4;
|
619
|
+
|
620
|
+
// The LLM addon not enabled case.
|
621
|
+
//
|
622
|
+
// Google skips the summary if the LLM addon is not enabled.
|
623
|
+
LLM_ADDON_NOT_ENABLED = 5;
|
624
|
+
}
|
625
|
+
|
626
|
+
// The summary content.
|
627
|
+
string summary_text = 1;
|
628
|
+
|
629
|
+
// Additional summary-skipped reasons. This provides the reason for ignored
|
630
|
+
// cases. If nothing is skipped, this field is not set.
|
631
|
+
repeated SummarySkippedReason summary_skipped_reasons = 2;
|
632
|
+
|
633
|
+
// A collection of Safety Attribute categories and their associated
|
634
|
+
// confidence scores.
|
635
|
+
SafetyAttributes safety_attributes = 3;
|
636
|
+
}
|
637
|
+
|
638
|
+
// Information describing query expansion including whether expansion has
|
639
|
+
// occurred.
|
640
|
+
message QueryExpansionInfo {
|
641
|
+
// Bool describing whether query expansion has occurred.
|
642
|
+
bool expanded_query = 1;
|
643
|
+
|
644
|
+
// Number of pinned results. This field will only be set when expansion
|
645
|
+
// happens and
|
646
|
+
// [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
|
647
|
+
// is set to true.
|
648
|
+
int64 pinned_result_count = 2;
|
649
|
+
}
|
650
|
+
|
263
651
|
// A list of matched documents. The order represents the ranking.
|
264
652
|
repeated SearchResult results = 1;
|
265
653
|
|
654
|
+
// Results of facets requested by user.
|
655
|
+
repeated Facet facets = 2;
|
656
|
+
|
266
657
|
// The estimated total count of matched items irrespective of pagination. The
|
267
658
|
// count of [results][google.cloud.discoveryengine.v1.SearchResponse.results]
|
268
659
|
// returned by pagination may be less than the
|
@@ -276,6 +667,14 @@ message SearchResponse {
|
|
276
667
|
// performance.
|
277
668
|
string attribution_token = 4;
|
278
669
|
|
670
|
+
// The URI of a customer-defined redirect page. If redirect action is
|
671
|
+
// triggered, no search is performed, and only
|
672
|
+
// [redirect_uri][google.cloud.discoveryengine.v1.SearchResponse.redirect_uri]
|
673
|
+
// and
|
674
|
+
// [attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token]
|
675
|
+
// are set in the response.
|
676
|
+
string redirect_uri = 12;
|
677
|
+
|
279
678
|
// A token that can be sent as
|
280
679
|
// [SearchRequest.page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token]
|
281
680
|
// to retrieve the next page. If this field is omitted, there are no
|
@@ -286,4 +685,13 @@ message SearchResponse {
|
|
286
685
|
// is AUTOMATIC, then the search results are based on corrected_query.
|
287
686
|
// Otherwise the original query is used for search.
|
288
687
|
string corrected_query = 7;
|
688
|
+
|
689
|
+
// A summary as part of the search results.
|
690
|
+
// This field is only returned if
|
691
|
+
// [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.summary_spec]
|
692
|
+
// is set.
|
693
|
+
Summary summary = 9;
|
694
|
+
|
695
|
+
// Query expansion information for the returned results.
|
696
|
+
QueryExpansionInfo query_expansion_info = 14;
|
289
697
|
}
|