@google-cloud/discoveryengine 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/README.md +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +1 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +131 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +281 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +6 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -22
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +193 -47
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +41 -36
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
- package/build/protos/protos.d.ts +6529 -4472
- package/build/protos/protos.js +16561 -11622
- package/build/protos/protos.json +1842 -1317
- package/build/src/v1/completion_service_client.d.ts +6 -7
- package/build/src/v1/document_service_client.d.ts +83 -94
- package/build/src/v1/document_service_client.js +18 -22
- package/build/src/v1/schema_service_client.d.ts +39 -49
- package/build/src/v1/schema_service_client.js +17 -22
- package/build/src/v1/search_service_client.d.ts +31 -34
- package/build/src/v1/search_service_client.js +21 -23
- package/build/src/v1/user_event_service_client.d.ts +6 -10
- package/build/src/v1/user_event_service_client.js +1 -2
- package/build/src/v1beta/completion_service_client.d.ts +106 -8
- package/build/src/v1beta/completion_service_client.js +128 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +876 -0
- package/build/src/v1beta/conversational_search_service_client.js +1149 -0
- package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
- package/build/src/v1beta/document_service_client.d.ts +183 -98
- package/build/src/v1beta/document_service_client.js +166 -22
- package/build/src/v1beta/index.d.ts +1 -0
- package/build/src/v1beta/index.js +3 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +103 -11
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +132 -49
- package/build/src/v1beta/schema_service_client.js +163 -22
- package/build/src/v1beta/search_service_client.d.ts +163 -67
- package/build/src/v1beta/search_service_client.js +175 -45
- package/build/src/v1beta/user_event_service_client.d.ts +104 -15
- package/build/src/v1beta/user_event_service_client.js +147 -2
- package/package.json +8 -11
@@ -55,11 +55,15 @@ message GcsSource {
|
|
55
55
|
// have a valid
|
56
56
|
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
|
57
57
|
// * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
|
58
|
-
// `input_uris`
|
58
|
+
// `input_uris` becomes a document, with the ID set to the first 128
|
59
59
|
// bits of SHA256(URI) encoded as a hex string.
|
60
60
|
// * `custom`: One custom data JSON per row in arbitrary format that conforms
|
61
|
-
// the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of
|
62
|
-
// data store. This can only be used by
|
61
|
+
// to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of
|
62
|
+
// the data store. This can only be used by Gen App Builder.
|
63
|
+
// * `csv`: A CSV file with header conforming to the defined
|
64
|
+
// [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
65
|
+
// data store. Each entry after the header is imported as a Document.
|
66
|
+
// This can only be used by Gen App Builder.
|
63
67
|
//
|
64
68
|
// Supported values for user even imports:
|
65
69
|
//
|
@@ -111,9 +115,9 @@ message BigQuerySource {
|
|
111
115
|
// [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data]
|
112
116
|
// or
|
113
117
|
// [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data].
|
114
|
-
// * `custom`: One custom data per row in arbitrary format that conforms
|
115
|
-
// defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
116
|
-
// store. This can only be used by
|
118
|
+
// * `custom`: One custom data per row in arbitrary format that conforms to
|
119
|
+
// the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
120
|
+
// data store. This can only be used by Gen App Builder.
|
117
121
|
string data_schema = 6;
|
118
122
|
}
|
119
123
|
|
@@ -122,7 +126,7 @@ message ImportErrorConfig {
|
|
122
126
|
// Required. Errors destination.
|
123
127
|
oneof destination {
|
124
128
|
// Cloud Storage prefix for import errors. This must be an empty,
|
125
|
-
// existing Cloud Storage directory. Import errors
|
129
|
+
// existing Cloud Storage directory. Import errors are written to
|
126
130
|
// sharded files in this directory, one per line, as a JSON-encoded
|
127
131
|
// `google.rpc.Status` message.
|
128
132
|
string gcs_prefix = 1;
|
@@ -137,16 +141,16 @@ message ImportUserEventsRequest {
|
|
137
141
|
repeated UserEvent user_events = 1 [(google.api.field_behavior) = REQUIRED];
|
138
142
|
}
|
139
143
|
|
140
|
-
// The desired input source of the user event data.
|
144
|
+
// Required - The desired input source of the user event data.
|
141
145
|
oneof source {
|
142
|
-
//
|
143
|
-
InlineSource inline_source = 2
|
146
|
+
// The Inline source for the input content for UserEvents.
|
147
|
+
InlineSource inline_source = 2;
|
144
148
|
|
145
|
-
//
|
146
|
-
GcsSource gcs_source = 3
|
149
|
+
// Cloud Storage location for the input content.
|
150
|
+
GcsSource gcs_source = 3;
|
147
151
|
|
148
|
-
//
|
149
|
-
BigQuerySource bigquery_source = 4
|
152
|
+
// BigQuery input source.
|
153
|
+
BigQuerySource bigquery_source = 4;
|
150
154
|
}
|
151
155
|
|
152
156
|
// Required. Parent DataStore resource name, of the form
|
@@ -182,7 +186,7 @@ message ImportUserEventsResponse {
|
|
182
186
|
int64 unjoined_events_count = 4;
|
183
187
|
}
|
184
188
|
|
185
|
-
// Metadata related to the progress of the Import operation. This
|
189
|
+
// Metadata related to the progress of the Import operation. This is
|
186
190
|
// returned by the google.longrunning.Operation.metadata field.
|
187
191
|
message ImportUserEventsMetadata {
|
188
192
|
// Operation create time.
|
@@ -199,8 +203,8 @@ message ImportUserEventsMetadata {
|
|
199
203
|
int64 failure_count = 4;
|
200
204
|
}
|
201
205
|
|
202
|
-
// Metadata related to the progress of the ImportDocuments operation. This
|
203
|
-
//
|
206
|
+
// Metadata related to the progress of the ImportDocuments operation. This is
|
207
|
+
// returned by the google.longrunning.Operation.metadata field.
|
204
208
|
message ImportDocumentsMetadata {
|
205
209
|
// Operation create time.
|
206
210
|
google.protobuf.Timestamp create_time = 1;
|
@@ -229,7 +233,7 @@ message ImportDocumentsRequest {
|
|
229
233
|
// Indicates how imported documents are reconciled with the existing documents
|
230
234
|
// created or imported before.
|
231
235
|
enum ReconciliationMode {
|
232
|
-
// Defaults to INCREMENTAL
|
236
|
+
// Defaults to `INCREMENTAL`.
|
233
237
|
RECONCILIATION_MODE_UNSPECIFIED = 0;
|
234
238
|
|
235
239
|
// Inserts new documents or updates existing documents.
|
@@ -281,7 +285,7 @@ message ImportDocumentsRequest {
|
|
281
285
|
// `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
|
282
286
|
// have to be specified using
|
283
287
|
// [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
|
284
|
-
//
|
288
|
+
// otherwise, documents without IDs fail to be imported.
|
285
289
|
//
|
286
290
|
// Only set this field when using
|
287
291
|
// [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or
|
@@ -290,7 +294,7 @@ message ImportDocumentsRequest {
|
|
290
294
|
// [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
|
291
295
|
// or
|
292
296
|
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
|
293
|
-
// is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
297
|
+
// is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
294
298
|
bool auto_generate_ids = 8;
|
295
299
|
|
296
300
|
// The field in the Cloud Storage and BigQuery sources that indicates the
|
@@ -302,12 +306,12 @@ message ImportDocumentsRequest {
|
|
302
306
|
// [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is
|
303
307
|
// the column name of the BigQuery table where the unique ids are stored.
|
304
308
|
//
|
305
|
-
// The values of the JSON field or the BigQuery column
|
309
|
+
// The values of the JSON field or the BigQuery column are used as the
|
306
310
|
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
|
307
311
|
// field or the BigQuery column must be of string type, and the values must be
|
308
312
|
// set as valid strings conform to
|
309
313
|
// [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
310
|
-
// Otherwise, documents without valid IDs
|
314
|
+
// Otherwise, documents without valid IDs fail to be imported.
|
311
315
|
//
|
312
316
|
// Only set this field when using
|
313
317
|
// [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or
|
@@ -40,7 +40,7 @@ message Schema {
|
|
40
40
|
// Schema representation. One of
|
41
41
|
// [struct_schema][google.cloud.discoveryengine.v1beta.Schema.struct_schema]
|
42
42
|
// or [json_schema][google.cloud.discoveryengine.v1beta.Schema.json_schema]
|
43
|
-
// should be provided otherwise an INVALID_ARGUMENT error is thrown.
|
43
|
+
// should be provided otherwise an `INVALID_ARGUMENT` error is thrown.
|
44
44
|
oneof schema {
|
45
45
|
// The structured representation of the schema.
|
46
46
|
google.protobuf.Struct struct_schema = 2;
|
@@ -56,6 +56,15 @@ service SearchService {
|
|
56
56
|
// [SearchService.Search][google.cloud.discoveryengine.v1beta.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
|
+
|
59
68
|
// A facet specification to perform faceted search.
|
60
69
|
message FacetSpec {
|
61
70
|
// Specifies how a facet is computed.
|
@@ -65,7 +74,7 @@ message SearchRequest {
|
|
65
74
|
// which the facet values are computed. Facet key is case-sensitive.
|
66
75
|
string key = 1 [(google.api.field_behavior) = REQUIRED];
|
67
76
|
|
68
|
-
// Set only if values should be
|
77
|
+
// Set only if values should be bucketed into intervals. Must be set
|
69
78
|
// for facets with numerical values. Must not be set for facet with text
|
70
79
|
// values. Maximum number of intervals is 30.
|
71
80
|
repeated Interval intervals = 2;
|
@@ -73,22 +82,22 @@ message SearchRequest {
|
|
73
82
|
// Only get facet for the given restricted values. Only supported on
|
74
83
|
// textual fields. For example, suppose "category" has three values
|
75
84
|
// "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
|
76
|
-
// "restricted_values" to "Action > 2022", the "category" facet
|
77
|
-
//
|
85
|
+
// "restricted_values" to "Action > 2022", the "category" facet only
|
86
|
+
// contains "Action > 2022". Only supported on textual fields. Maximum
|
78
87
|
// is 10.
|
79
88
|
repeated string restricted_values = 3;
|
80
89
|
|
81
90
|
// Only get facet values that start with the given string prefix. For
|
82
91
|
// example, suppose "category" has three values "Action > 2022",
|
83
92
|
// "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
|
84
|
-
// "category" facet
|
93
|
+
// "category" facet only contains "Action > 2022" and "Action > 2021".
|
85
94
|
// Only supported on textual fields. Maximum is 10.
|
86
95
|
repeated string prefixes = 4;
|
87
96
|
|
88
97
|
// Only get facet values that contains the given strings. For example,
|
89
98
|
// suppose "category" has three values "Action > 2022",
|
90
99
|
// "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
91
|
-
// "category" facet
|
100
|
+
// "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
|
92
101
|
// Only supported on textual fields. Maximum is 10.
|
93
102
|
repeated string contains = 5;
|
94
103
|
|
@@ -121,7 +130,7 @@ message SearchRequest {
|
|
121
130
|
|
122
131
|
// Maximum of facet values that should be returned for this facet. If
|
123
132
|
// unspecified, defaults to 20. The maximum allowed value is 300. Values
|
124
|
-
// above 300
|
133
|
+
// above 300 are coerced to 300.
|
125
134
|
//
|
126
135
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
127
136
|
int32 limit = 2;
|
@@ -158,15 +167,15 @@ message SearchRequest {
|
|
158
167
|
|
159
168
|
// Enables dynamic position for this facet. If set to true, the position of
|
160
169
|
// this facet among all facets in the response is determined automatically.
|
161
|
-
//
|
162
|
-
//
|
163
|
-
// response
|
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
|
164
173
|
// the facets with dynamic position enable and all dynamic facets.
|
165
174
|
//
|
166
175
|
// For example, you may always want to have rating facet returned in
|
167
176
|
// the response, but it's not necessarily to always display the rating facet
|
168
177
|
// at the top. In that case, you can set enable_dynamic_position to true so
|
169
|
-
// that the position of rating facet in response
|
178
|
+
// that the position of rating facet in response is determined
|
170
179
|
// automatically.
|
171
180
|
//
|
172
181
|
// Another example, assuming you have the following facets in the request:
|
@@ -177,13 +186,13 @@ message SearchRequest {
|
|
177
186
|
//
|
178
187
|
// * "brands", enable_dynamic_position = false
|
179
188
|
//
|
180
|
-
// And also you have a dynamic facets
|
181
|
-
//
|
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
|
182
191
|
// ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
|
183
192
|
// "rating") depends on how API orders "gender" and "rating" facets.
|
184
|
-
// However, notice that "price" and "brands"
|
185
|
-
// ranked at
|
186
|
-
// false.
|
193
|
+
// However, notice that "price" and "brands" are always
|
194
|
+
// ranked at first and second position because their enable_dynamic_position
|
195
|
+
// is false.
|
187
196
|
bool enable_dynamic_position = 4;
|
188
197
|
}
|
189
198
|
|
@@ -281,40 +290,132 @@ message SearchRequest {
|
|
281
290
|
Mode mode = 1;
|
282
291
|
}
|
283
292
|
|
284
|
-
//
|
285
|
-
// search.
|
293
|
+
// A specification for configuring the behavior of content search.
|
286
294
|
message ContentSearchSpec {
|
287
|
-
//
|
295
|
+
// A specification for configuring snippets in a search response.
|
288
296
|
message SnippetSpec {
|
289
|
-
//
|
290
|
-
//
|
291
|
-
//
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
297
|
+
// [DEPRECATED] This field is deprecated. To control snippet return, use
|
298
|
+
// `return_snippet` field. For backwards compatibility, we will return
|
299
|
+
// snippet if max_snippet_count > 0.
|
300
|
+
int32 max_snippet_count = 1 [deprecated = true];
|
301
|
+
|
302
|
+
// [DEPRECATED] This field is deprecated and will have no affect on the
|
303
|
+
// snippet.
|
304
|
+
bool reference_only = 2 [deprecated = true];
|
305
|
+
|
306
|
+
// If `true`, then return snippet. If no snippet can be generated, we
|
307
|
+
// return "No snippet is available for this page." A `snippet_status` with
|
308
|
+
// `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
|
309
|
+
bool return_snippet = 3;
|
298
310
|
}
|
299
311
|
|
300
|
-
//
|
312
|
+
// A specification for configuring a summary returned in a search
|
313
|
+
// response.
|
301
314
|
message SummarySpec {
|
302
|
-
// The number of top results the summary
|
303
|
-
//
|
304
|
-
//
|
305
|
-
// summary would be derived from the top results.
|
315
|
+
// The number of top results to generate the summary from. If the number
|
316
|
+
// of results returned is less than `summaryResultCount`, the summary is
|
317
|
+
// generated from all of the results.
|
306
318
|
//
|
307
|
-
// At most
|
319
|
+
// At most five results can be used to generate a summary.
|
308
320
|
int32 summary_result_count = 1;
|
321
|
+
|
322
|
+
// Specifies whether to include citations in the summary. The default
|
323
|
+
// value is `false`.
|
324
|
+
//
|
325
|
+
// When this field is set to `true`, summaries include in-line citation
|
326
|
+
// numbers.
|
327
|
+
//
|
328
|
+
// Example summary including citations:
|
329
|
+
//
|
330
|
+
// BigQuery is Google Cloud's fully managed and completely serverless
|
331
|
+
// enterprise data warehouse [1]. BigQuery supports all data types, works
|
332
|
+
// across clouds, and has built-in machine learning and business
|
333
|
+
// intelligence, all within a unified platform [2, 3].
|
334
|
+
//
|
335
|
+
// The citation numbers refer to the returned search results and are
|
336
|
+
// 1-indexed. For example, [1] means that the sentence is attributed to
|
337
|
+
// the first search result. [2, 3] means that the sentence is attributed
|
338
|
+
// to both the second and third search results.
|
339
|
+
bool include_citations = 2;
|
340
|
+
|
341
|
+
// Specifies whether to filter out adversarial queries. The default value
|
342
|
+
// is `false`.
|
343
|
+
//
|
344
|
+
// Google employs search-query classification to detect adversarial
|
345
|
+
// queries. No summary is returned if the search query is classified as an
|
346
|
+
// adversarial query. For example, a user might ask a question regarding
|
347
|
+
// negative comments about the company or submit a query designed to
|
348
|
+
// generate unsafe, policy-violating output. If this field is set to
|
349
|
+
// `true`, we skip generating summaries for adversarial queries and return
|
350
|
+
// fallback messages instead.
|
351
|
+
bool ignore_adversarial_query = 3;
|
352
|
+
|
353
|
+
// Specifies whether to filter out queries that are not summary-seeking.
|
354
|
+
// The default value is `false`.
|
355
|
+
//
|
356
|
+
// Google employs search-query classification to detect summary-seeking
|
357
|
+
// queries. No summary is returned if the search query is classified as a
|
358
|
+
// non-summary seeking query. For example, `why is the sky blue` and `Who
|
359
|
+
// is the best soccer player in the world?` are summary-seeking queries,
|
360
|
+
// but `SFO airport` and `world cup 2026` are not. They are most likely
|
361
|
+
// navigational queries. If this field is set to `true`, we skip
|
362
|
+
// generating summaries for non-summary seeking queries and return
|
363
|
+
// fallback messages instead.
|
364
|
+
bool ignore_non_summary_seeking_query = 4;
|
365
|
+
}
|
366
|
+
|
367
|
+
// A specification for configuring the extractive content in a search
|
368
|
+
// response.
|
369
|
+
message ExtractiveContentSpec {
|
370
|
+
// The maximum number of extractive answers returned in each search
|
371
|
+
// result.
|
372
|
+
//
|
373
|
+
// An extractive answer is a verbatim answer extracted from the original
|
374
|
+
// document, which provides a precise and contextually relevant answer to
|
375
|
+
// the search query.
|
376
|
+
//
|
377
|
+
// If the number of matching answers is less than the
|
378
|
+
// `max_extractive_answer_count`, return all of the answers. Otherwise,
|
379
|
+
// return the `max_extractive_answer_count`.
|
380
|
+
//
|
381
|
+
// At most one answer is returned for each
|
382
|
+
// [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
|
383
|
+
int32 max_extractive_answer_count = 1;
|
384
|
+
|
385
|
+
// The max number of extractive segments returned in each search result.
|
386
|
+
// Only applied if the
|
387
|
+
// [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
|
388
|
+
// [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
|
389
|
+
// or
|
390
|
+
// [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
|
391
|
+
// is
|
392
|
+
// [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
|
393
|
+
//
|
394
|
+
// An extractive segment is a text segment extracted from the original
|
395
|
+
// document that is relevant to the search query, and, in general, more
|
396
|
+
// verbose than an extractive answer. The segment could then be used as
|
397
|
+
// input for LLMs to generate summaries and answers.
|
398
|
+
//
|
399
|
+
// If the number of matching segments is less than
|
400
|
+
// `max_extractive_segment_count`, return all of the segments. Otherwise,
|
401
|
+
// return the `max_extractive_segment_count`.
|
402
|
+
//
|
403
|
+
// Currently one segment is returned for each
|
404
|
+
// [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
|
405
|
+
int32 max_extractive_segment_count = 2;
|
309
406
|
}
|
310
407
|
|
311
|
-
// If
|
312
|
-
// search
|
408
|
+
// If `snippetSpec` is not specified, snippets are not included in the
|
409
|
+
// search response.
|
313
410
|
SnippetSpec snippet_spec = 1;
|
314
411
|
|
315
|
-
// If
|
412
|
+
// If `summarySpec` is not specified, summaries are not included in the
|
316
413
|
// search response.
|
317
414
|
SummarySpec summary_spec = 2;
|
415
|
+
|
416
|
+
// If there is no extractive_content_spec provided, there will be no
|
417
|
+
// extractive answer in the search response.
|
418
|
+
ExtractiveContentSpec extractive_content_spec = 3;
|
318
419
|
}
|
319
420
|
|
320
421
|
// Required. The resource name of the Search serving config, such as
|
@@ -340,9 +441,12 @@ message SearchRequest {
|
|
340
441
|
// Raw search query.
|
341
442
|
string query = 3;
|
342
443
|
|
444
|
+
// Raw image query.
|
445
|
+
ImageQuery image_query = 19;
|
446
|
+
|
343
447
|
// Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
|
344
448
|
// to return. If unspecified, defaults to a reasonable value. The maximum
|
345
|
-
// allowed value is 100. Values above 100
|
449
|
+
// allowed value is 100. Values above 100 are coerced to 100.
|
346
450
|
//
|
347
451
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
348
452
|
int32 page_size = 4;
|
@@ -374,17 +478,18 @@ message SearchRequest {
|
|
374
478
|
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
375
479
|
string filter = 7;
|
376
480
|
|
377
|
-
// The order in which documents are returned.
|
481
|
+
// The order in which documents are returned. Documents can be ordered by
|
378
482
|
// a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
|
379
|
-
// object. Leave it unset if ordered by relevance.
|
483
|
+
// object. Leave it unset if ordered by relevance. `order_by` expression is
|
380
484
|
// case-sensitive.
|
381
485
|
//
|
382
|
-
// If this field is unrecognizable, an
|
486
|
+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
383
487
|
string order_by = 8;
|
384
488
|
|
385
489
|
// Information about the end user.
|
386
|
-
// Highly recommended for analytics.
|
387
|
-
//
|
490
|
+
// Highly recommended for analytics.
|
491
|
+
// [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
|
492
|
+
// is used to deduce `device_type` for analytics.
|
388
493
|
UserInfo user_info = 21;
|
389
494
|
|
390
495
|
// Facet specifications for faceted search. If empty, no facets are returned.
|
@@ -408,11 +513,11 @@ message SearchRequest {
|
|
408
513
|
map<string, google.protobuf.Value> params = 11;
|
409
514
|
|
410
515
|
// The query expansion specification that specifies the conditions under which
|
411
|
-
// query expansion
|
516
|
+
// query expansion occurs.
|
412
517
|
QueryExpansionSpec query_expansion_spec = 13;
|
413
518
|
|
414
519
|
// The spell correction specification that specifies the mode under
|
415
|
-
// which spell correction
|
520
|
+
// which spell correction takes effect.
|
416
521
|
SpellCorrectionSpec spell_correction_spec = 14;
|
417
522
|
|
418
523
|
// A unique identifier for tracking visitors. For example, this could be
|
@@ -431,12 +536,11 @@ message SearchRequest {
|
|
431
536
|
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
432
537
|
string user_pseudo_id = 15;
|
433
538
|
|
434
|
-
//
|
435
|
-
// search.
|
539
|
+
// A specification for configuring the behavior of content search.
|
436
540
|
ContentSearchSpec content_search_spec = 24;
|
437
541
|
|
438
542
|
// Whether to turn on safe search. This is only supported for
|
439
|
-
//
|
543
|
+
// website search.
|
440
544
|
bool safe_search = 20;
|
441
545
|
|
442
546
|
// The user labels applied to a resource must meet the following requirements:
|
@@ -518,12 +622,46 @@ message SearchResponse {
|
|
518
622
|
|
519
623
|
// A list of ranked refinement attributes.
|
520
624
|
repeated RefinementAttribute refinement_attributes = 1;
|
625
|
+
|
626
|
+
// Suggested follow-up questions.
|
627
|
+
repeated string follow_up_questions = 2;
|
521
628
|
}
|
522
629
|
|
523
630
|
// Summary of the top N search result specified by the summary spec.
|
524
631
|
message Summary {
|
632
|
+
// An Enum for summary-skipped reasons.
|
633
|
+
enum SummarySkippedReason {
|
634
|
+
// Default value. The summary skipped reason is not specified.
|
635
|
+
SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0;
|
636
|
+
|
637
|
+
// The adversarial query ignored case.
|
638
|
+
//
|
639
|
+
// Only populated when
|
640
|
+
// [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
|
641
|
+
// is set to `true`.
|
642
|
+
ADVERSARIAL_QUERY_IGNORED = 1;
|
643
|
+
|
644
|
+
// The non-summary seeking query ignored case.
|
645
|
+
//
|
646
|
+
// Only populated when
|
647
|
+
// [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
|
648
|
+
// is set to `true`.
|
649
|
+
NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
|
650
|
+
|
651
|
+
// The out-of-domain query ignored case.
|
652
|
+
//
|
653
|
+
// Google skips the summary if there are no high-relevance search results.
|
654
|
+
// For example, the data store contains facts about company A but the
|
655
|
+
// user query is asking questions about company B.
|
656
|
+
OUT_OF_DOMAIN_QUERY_IGNORED = 3;
|
657
|
+
}
|
658
|
+
|
525
659
|
// The summary content.
|
526
660
|
string summary_text = 1;
|
661
|
+
|
662
|
+
// Additional summary-skipped reasons. This provides the reason for ignored
|
663
|
+
// cases. If nothing is skipped, this field is not set.
|
664
|
+
repeated SummarySkippedReason summary_skipped_reasons = 2;
|
527
665
|
}
|
528
666
|
|
529
667
|
// A list of matched documents. The order represents the ranking.
|
@@ -549,6 +687,14 @@ message SearchResponse {
|
|
549
687
|
// performance.
|
550
688
|
string attribution_token = 4;
|
551
689
|
|
690
|
+
// The URI of a customer-defined redirect page. If redirect action is
|
691
|
+
// triggered, no search is performed, and only
|
692
|
+
// [redirect_uri][google.cloud.discoveryengine.v1beta.SearchResponse.redirect_uri]
|
693
|
+
// and
|
694
|
+
// [attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token]
|
695
|
+
// are set in the response.
|
696
|
+
string redirect_uri = 12;
|
697
|
+
|
552
698
|
// A token that can be sent as
|
553
699
|
// [SearchRequest.page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
|
554
700
|
// to retrieve the next page. If this field is omitted, there are no
|