@google-cloud/discoveryengine 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/protos/protos.d.ts +31 -316
  3. package/build/protos/protos.js +146 -593
  4. package/build/protos/protos.json +25 -1
  5. package/build/src/index.d.ts +1 -1
  6. package/build/src/index.js +1 -21
  7. package/build/src/v1/completion_service_client.d.ts +76 -76
  8. package/build/src/v1/completion_service_client.js +125 -262
  9. package/build/src/v1/control_service_client.d.ts +81 -81
  10. package/build/src/v1/control_service_client.js +96 -132
  11. package/build/src/v1/conversational_search_service_client.d.ts +143 -143
  12. package/build/src/v1/conversational_search_service_client.js +138 -226
  13. package/build/src/v1/data_store_service_client.d.ts +122 -122
  14. package/build/src/v1/data_store_service_client.js +134 -280
  15. package/build/src/v1/document_service_client.d.ts +120 -120
  16. package/build/src/v1/document_service_client.js +143 -300
  17. package/build/src/v1/engine_service_client.d.ts +103 -103
  18. package/build/src/v1/engine_service_client.js +134 -279
  19. package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
  20. package/build/src/v1/grounded_generation_service_client.js +79 -100
  21. package/build/src/v1/project_service_client.d.ts +76 -76
  22. package/build/src/v1/project_service_client.js +108 -222
  23. package/build/src/v1/rank_service_client.d.ts +47 -47
  24. package/build/src/v1/rank_service_client.js +72 -85
  25. package/build/src/v1/recommendation_service_client.d.ts +47 -47
  26. package/build/src/v1/recommendation_service_client.js +70 -82
  27. package/build/src/v1/schema_service_client.d.ts +111 -111
  28. package/build/src/v1/schema_service_client.js +131 -273
  29. package/build/src/v1/search_service_client.d.ts +545 -545
  30. package/build/src/v1/search_service_client.js +90 -113
  31. package/build/src/v1/search_tuning_service_client.d.ts +77 -77
  32. package/build/src/v1/search_tuning_service_client.js +113 -235
  33. package/build/src/v1/serving_config_service_client.d.ts +48 -48
  34. package/build/src/v1/serving_config_service_client.js +69 -80
  35. package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
  36. package/build/src/v1/site_search_engine_service_client.js +179 -378
  37. package/build/src/v1/user_event_service_client.d.ts +77 -77
  38. package/build/src/v1/user_event_service_client.js +121 -253
  39. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  40. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  41. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  42. package/build/src/v1alpha/chunk_service_client.js +92 -120
  43. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  44. package/build/src/v1alpha/completion_service_client.js +134 -280
  45. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  46. package/build/src/v1alpha/control_service_client.js +105 -151
  47. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  48. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  49. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  50. package/build/src/v1alpha/data_store_service_client.js +151 -316
  51. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  52. package/build/src/v1alpha/document_service_client.js +156 -328
  53. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  54. package/build/src/v1alpha/engine_service_client.js +155 -325
  55. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  56. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  57. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  58. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  59. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  60. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  61. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  62. package/build/src/v1alpha/project_service_client.js +126 -262
  63. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  64. package/build/src/v1alpha/rank_service_client.js +81 -104
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  66. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  67. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  68. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  69. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  70. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  71. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  72. package/build/src/v1alpha/schema_service_client.js +140 -292
  73. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  74. package/build/src/v1alpha/search_service_client.js +88 -112
  75. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  76. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  77. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  78. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  79. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  80. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  81. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  82. package/build/src/v1alpha/user_event_service_client.js +130 -271
  83. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  84. package/build/src/v1beta/completion_service_client.js +136 -279
  85. package/build/src/v1beta/control_service_client.d.ts +84 -84
  86. package/build/src/v1beta/control_service_client.js +103 -147
  87. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  88. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  89. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  90. package/build/src/v1beta/data_store_service_client.js +141 -288
  91. package/build/src/v1beta/document_service_client.d.ts +124 -124
  92. package/build/src/v1beta/document_service_client.js +150 -309
  93. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  94. package/build/src/v1beta/engine_service_client.js +153 -315
  95. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  96. package/build/src/v1beta/evaluation_service_client.js +141 -285
  97. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  98. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  99. package/build/src/v1beta/project_service_client.d.ts +76 -76
  100. package/build/src/v1beta/project_service_client.js +115 -231
  101. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  102. package/build/src/v1beta/rank_service_client.js +79 -99
  103. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  104. package/build/src/v1beta/recommendation_service_client.js +77 -96
  105. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  106. package/build/src/v1beta/sample_query_service_client.js +142 -291
  107. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  108. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  109. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  110. package/build/src/v1beta/schema_service_client.js +138 -282
  111. package/build/src/v1beta/search_service_client.d.ts +665 -665
  112. package/build/src/v1beta/search_service_client.js +97 -128
  113. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  114. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  115. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  116. package/build/src/v1beta/serving_config_service_client.js +95 -129
  117. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  118. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  119. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  120. package/build/src/v1beta/user_event_service_client.js +128 -261
  121. package/package.json +1 -1
@@ -117,597 +117,305 @@ export declare class SearchServiceClient {
117
117
  getProjectId(): Promise<string>;
118
118
  getProjectId(callback: Callback<string, undefined, undefined>): void;
119
119
  /**
120
- * Performs a search.
121
- *
122
- * @param {Object} request
123
- * The request object that will be sent.
124
- * @param {string} request.servingConfig
125
- * Required. The resource name of the Search serving config, such as
126
- * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
127
- * or
128
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
129
- * This field is used to identify the serving configuration name, set
130
- * of models used to make the search.
131
- * @param {string} request.branch
132
- * The branch resource name, such as
133
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
134
- *
135
- * Use `default_branch` as the branch ID or leave this field empty, to search
136
- * documents under the default branch.
137
- * @param {string} request.query
138
- * Raw search query.
139
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
140
- * Raw image query.
141
- * @param {number} request.pageSize
142
- * Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
143
- * to return. The maximum allowed value depends on the data type. Values above
144
- * the maximum value are coerced to the maximum value.
145
- *
146
- * * Websites with basic indexing: Default `10`, Maximum `25`.
147
- * * Websites with advanced indexing: Default `25`, Maximum `50`.
148
- * * Other: Default `50`, Maximum `100`.
149
- *
150
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
151
- * @param {string} request.pageToken
152
- * A page token received from a previous
153
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
154
- * call. Provide this to retrieve the subsequent page.
155
- *
156
- * When paginating, all other parameters provided to
157
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
158
- * must match the call that provided the page token. Otherwise, an
159
- * `INVALID_ARGUMENT` error is returned.
160
- * @param {number} request.offset
161
- * A 0-indexed integer that specifies the current offset (that is, starting
162
- * result location, amongst the
163
- * {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
164
- * as relevant) in search results. This field is only considered if
165
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
166
- * is unset.
167
- *
168
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
169
- * @param {number} request.oneBoxPageSize
170
- * The maximum number of results to return for OneBox.
171
- * This applies to each OneBox type individually.
172
- * Default number is 10.
173
- * @param {number[]} request.dataStoreSpecs
174
- * Specs defining dataStores to filter on in a search call and configurations
175
- * for those dataStores. This is only considered for engines with multiple
176
- * dataStores use case. For single dataStore within an engine, they should
177
- * use the specs at the top level.
178
- * @param {string} request.filter
179
- * The filter syntax consists of an expression language for constructing a
180
- * predicate from one or more fields of the documents being filtered. Filter
181
- * expression is case-sensitive.
182
- *
183
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
184
- *
185
- * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
186
- * key property defined in the Vertex AI Search backend -- this mapping is
187
- * defined by the customer in their schema. For example a media customer might
188
- * have a field 'name' in their schema. In this case the filter would look
189
- * like this: filter --> name:'ANY("king kong")'
190
- *
191
- * For more information about filtering including syntax and filter
192
- * operators, see
193
- * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
194
- * @param {string} request.canonicalFilter
195
- * The default filter that is applied when a user performs a search without
196
- * checking any filters on the search page.
197
- *
198
- * The filter applied to every search request when quality improvement such as
199
- * query expansion is needed. In the case a query does not have a sufficient
200
- * amount of results this filter will be used to determine whether or not to
201
- * enable the query expansion flow. The original filter will still be used for
202
- * the query expanded search.
203
- * This field is strongly recommended to achieve high search quality.
204
- *
205
- * For more information about filter syntax, see
206
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.filter|SearchRequest.filter}.
207
- * @param {string} request.orderBy
208
- * The order in which documents are returned. Documents can be ordered by
209
- * a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
210
- * object. Leave it unset if ordered by relevance. `order_by` expression is
211
- * case-sensitive.
212
- *
213
- * For more information on ordering the website search results, see
214
- * [Order web search
215
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
216
- * For more information on ordering the healthcare search results, see
217
- * [Order healthcare search
218
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
219
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
220
- * @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
221
- * Information about the end user.
222
- * Highly recommended for analytics.
223
- * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
224
- * is used to deduce `device_type` for analytics.
225
- * @param {string} request.languageCode
226
- * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
227
- * information, see [Standard
228
- * fields](https://cloud.google.com/apis/design/standard_fields). This field
229
- * helps to better interpret the query. If a value isn't specified, the query
230
- * language code is automatically detected, which may not be accurate.
231
- * @param {string} request.regionCode
232
- * The Unicode country/region code (CLDR) of a location, such as "US" and
233
- * "419". For more information, see [Standard
234
- * fields](https://cloud.google.com/apis/design/standard_fields). If set,
235
- * then results will be boosted based on the region_code provided.
236
- * @param {number[]} request.facetSpecs
237
- * Facet specifications for faceted search. If empty, no facets are returned.
238
- *
239
- * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
240
- * error is returned.
241
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec
242
- * Boost specification to boost certain documents.
243
- * For more information on boosting, see
244
- * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
245
- * @param {number[]} request.params
246
- * Additional search parameters.
247
- *
248
- * For public website search only, supported values are:
249
- *
250
- * * `user_country_code`: string. Default empty. If set to non-empty, results
251
- * are restricted or boosted based on the location provided.
252
- * For example, `user_country_code: "au"`
253
- *
254
- * For available codes see [Country
255
- * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
256
- *
257
- * * `search_type`: double. Default empty. Enables non-webpage searching
258
- * depending on the value. The only valid non-default value is 1,
259
- * which enables image searching.
260
- * For example, `search_type: 1`
261
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
262
- * The query expansion specification that specifies the conditions under which
263
- * query expansion occurs.
264
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
265
- * The spell correction specification that specifies the mode under
266
- * which spell correction takes effect.
267
- * @param {string} request.userPseudoId
268
- * A unique identifier for tracking visitors. For example, this could be
269
- * implemented with an HTTP cookie, which should be able to uniquely identify
270
- * a visitor on a single device. This unique identifier should not change if
271
- * the visitor logs in or out of the website.
272
- *
273
- * This field should NOT have a fixed value such as `unknown_visitor`.
274
- *
275
- * This should be the same identifier as
276
- * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
277
- * and
278
- * {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
279
- *
280
- * The field must be a UTF-8 encoded string with a length limit of 128
281
- * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
282
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
283
- * A specification for configuring the behavior of content search.
284
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
285
- * Uses the provided embedding to do additional semantic document retrieval.
286
- * The retrieval is based on the dot product of
287
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
288
- * and the document embedding that is provided in
289
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
290
- *
291
- * If
292
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
293
- * is not provided, it will use
294
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
295
- * @param {string} request.rankingExpression
296
- * The ranking expression controls the customized ranking on retrieval
297
- * documents. This overrides
298
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
299
- * The ranking expression is a single function or multiple functions that are
300
- * joined by "+".
301
- *
302
- * * ranking_expression = function, { " + ", function };
303
- *
304
- * Supported functions:
305
- *
306
- * * double * relevance_score
307
- * * double * dotProduct(embedding_field_path)
308
- *
309
- * Function variables:
310
- *
311
- * * `relevance_score`: pre-defined keywords, used for measure relevance
312
- * between query and document.
313
- * * `embedding_field_path`: the document embedding field
314
- * used with query embedding vector.
315
- * * `dotProduct`: embedding function between embedding_field_path and query
316
- * embedding vector.
317
- *
318
- * Example ranking expression:
319
- *
320
- * If document has an embedding field doc_embedding, the ranking expression
321
- * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
322
- * @param {boolean} request.safeSearch
323
- * Whether to turn on safe search. This is only supported for
324
- * website search.
325
- * @param {number[]} request.userLabels
326
- * The user labels applied to a resource must meet the following requirements:
327
- *
328
- * * Each resource can have multiple labels, up to a maximum of 64.
329
- * * Each label must be a key-value pair.
330
- * * Keys have a minimum length of 1 character and a maximum length of 63
331
- * characters and cannot be empty. Values can be empty and have a maximum
332
- * length of 63 characters.
333
- * * Keys and values can contain only lowercase letters, numeric characters,
334
- * underscores, and dashes. All characters must use UTF-8 encoding, and
335
- * international characters are allowed.
336
- * * The key portion of a label must be unique. However, you can use the same
337
- * key with multiple resources.
338
- * * Keys must start with a lowercase letter or international character.
339
- *
340
- * See [Google Cloud
341
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
342
- * for more details.
343
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
344
- * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
345
- * natural language query understanding will be done.
346
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
347
- * Search as you type configuration. Only supported for the
348
- * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
349
- * vertical.
350
- * @param {string} request.session
351
- * The session resource name. Optional.
352
- *
353
- * Session allows users to do multi-turn /search API calls or coordination
354
- * between /search API calls and /answer API calls.
355
- *
356
- * Example #1 (multi-turn /search API calls):
357
- * 1. Call /search API with the auto-session mode (see below).
358
- * 2. Call /search API with the session ID generated in the first call.
359
- * Here, the previous search query gets considered in query
360
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
361
- * and the current query is "How about 2023?", the current query will
362
- * be interpreted as "How did Alphabet do in 2023?".
363
- *
364
- * Example #2 (coordination between /search API calls and /answer API calls):
365
- * 1. Call /search API with the auto-session mode (see below).
366
- * 2. Call /answer API with the session ID generated in the first call.
367
- * Here, the answer generation happens in the context of the search
368
- * results from the first search call.
369
- *
370
- * Auto-session mode: when `projects/.../sessions/-` is used, a new session
371
- * gets automatically created. Otherwise, users can use the create-session API
372
- * to create a session manually.
373
- *
374
- * Multi-turn Search feature is currently at private GA stage. Please use
375
- * v1alpha or v1beta version instead before we launch this feature to public
376
- * GA. Or ask for allowlisting through Google Support team.
377
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
378
- * Session specification.
379
- *
380
- * Can be used only when `session` is set.
381
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} request.relevanceThreshold
382
- * The relevance threshold of the search results.
383
- *
384
- * Default to Google defined threshold, leveraging a balance of
385
- * precision and recall to deliver both highly accurate results and
386
- * comprehensive coverage of relevant information.
387
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} request.personalizationSpec
388
- * The specification for personalization.
389
- *
390
- * Notice that if both
391
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}
392
- * and
393
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
394
- * are set,
395
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
396
- * overrides
397
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
398
- * @param {object} [options]
399
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
400
- * @returns {Promise} - The promise which resolves to an array.
401
- * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}.
402
- * The client library will perform auto-pagination by default: it will call the API as many
403
- * times as needed and will merge results from all the pages into this array.
404
- * Note that it can affect your quota.
405
- * We recommend using `searchAsync()`
406
- * method described below for async iteration which you can stop as needed.
407
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
408
- * for more details and examples.
409
- */
410
- search(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Promise<[
411
- protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[],
412
- protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null,
413
- protos.google.cloud.discoveryengine.v1beta.ISearchResponse
414
- ]>;
415
- search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
416
- search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
417
- /**
418
- * Equivalent to `search`, but returns a NodeJS Stream object.
419
- * @param {Object} request
420
- * The request object that will be sent.
421
- * @param {string} request.servingConfig
422
- * Required. The resource name of the Search serving config, such as
423
- * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
424
- * or
425
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
426
- * This field is used to identify the serving configuration name, set
427
- * of models used to make the search.
428
- * @param {string} request.branch
429
- * The branch resource name, such as
430
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
431
- *
432
- * Use `default_branch` as the branch ID or leave this field empty, to search
433
- * documents under the default branch.
434
- * @param {string} request.query
435
- * Raw search query.
436
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
437
- * Raw image query.
438
- * @param {number} request.pageSize
439
- * Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
440
- * to return. The maximum allowed value depends on the data type. Values above
441
- * the maximum value are coerced to the maximum value.
442
- *
443
- * * Websites with basic indexing: Default `10`, Maximum `25`.
444
- * * Websites with advanced indexing: Default `25`, Maximum `50`.
445
- * * Other: Default `50`, Maximum `100`.
446
- *
447
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
448
- * @param {string} request.pageToken
449
- * A page token received from a previous
450
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
451
- * call. Provide this to retrieve the subsequent page.
452
- *
453
- * When paginating, all other parameters provided to
454
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
455
- * must match the call that provided the page token. Otherwise, an
456
- * `INVALID_ARGUMENT` error is returned.
457
- * @param {number} request.offset
458
- * A 0-indexed integer that specifies the current offset (that is, starting
459
- * result location, amongst the
460
- * {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
461
- * as relevant) in search results. This field is only considered if
462
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
463
- * is unset.
464
- *
465
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
466
- * @param {number} request.oneBoxPageSize
467
- * The maximum number of results to return for OneBox.
468
- * This applies to each OneBox type individually.
469
- * Default number is 10.
470
- * @param {number[]} request.dataStoreSpecs
471
- * Specs defining dataStores to filter on in a search call and configurations
472
- * for those dataStores. This is only considered for engines with multiple
473
- * dataStores use case. For single dataStore within an engine, they should
474
- * use the specs at the top level.
475
- * @param {string} request.filter
476
- * The filter syntax consists of an expression language for constructing a
477
- * predicate from one or more fields of the documents being filtered. Filter
478
- * expression is case-sensitive.
479
- *
480
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
481
- *
482
- * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
483
- * key property defined in the Vertex AI Search backend -- this mapping is
484
- * defined by the customer in their schema. For example a media customer might
485
- * have a field 'name' in their schema. In this case the filter would look
486
- * like this: filter --> name:'ANY("king kong")'
487
- *
488
- * For more information about filtering including syntax and filter
489
- * operators, see
490
- * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
491
- * @param {string} request.canonicalFilter
492
- * The default filter that is applied when a user performs a search without
493
- * checking any filters on the search page.
494
- *
495
- * The filter applied to every search request when quality improvement such as
496
- * query expansion is needed. In the case a query does not have a sufficient
497
- * amount of results this filter will be used to determine whether or not to
498
- * enable the query expansion flow. The original filter will still be used for
499
- * the query expanded search.
500
- * This field is strongly recommended to achieve high search quality.
501
- *
502
- * For more information about filter syntax, see
503
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.filter|SearchRequest.filter}.
504
- * @param {string} request.orderBy
505
- * The order in which documents are returned. Documents can be ordered by
506
- * a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
507
- * object. Leave it unset if ordered by relevance. `order_by` expression is
508
- * case-sensitive.
509
- *
510
- * For more information on ordering the website search results, see
511
- * [Order web search
512
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
513
- * For more information on ordering the healthcare search results, see
514
- * [Order healthcare search
515
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
516
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
517
- * @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
518
- * Information about the end user.
519
- * Highly recommended for analytics.
520
- * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
521
- * is used to deduce `device_type` for analytics.
522
- * @param {string} request.languageCode
523
- * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
524
- * information, see [Standard
525
- * fields](https://cloud.google.com/apis/design/standard_fields). This field
526
- * helps to better interpret the query. If a value isn't specified, the query
527
- * language code is automatically detected, which may not be accurate.
528
- * @param {string} request.regionCode
529
- * The Unicode country/region code (CLDR) of a location, such as "US" and
530
- * "419". For more information, see [Standard
531
- * fields](https://cloud.google.com/apis/design/standard_fields). If set,
532
- * then results will be boosted based on the region_code provided.
533
- * @param {number[]} request.facetSpecs
534
- * Facet specifications for faceted search. If empty, no facets are returned.
535
- *
536
- * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
537
- * error is returned.
538
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec
539
- * Boost specification to boost certain documents.
540
- * For more information on boosting, see
541
- * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
542
- * @param {number[]} request.params
543
- * Additional search parameters.
544
- *
545
- * For public website search only, supported values are:
546
- *
547
- * * `user_country_code`: string. Default empty. If set to non-empty, results
548
- * are restricted or boosted based on the location provided.
549
- * For example, `user_country_code: "au"`
550
- *
551
- * For available codes see [Country
552
- * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
553
- *
554
- * * `search_type`: double. Default empty. Enables non-webpage searching
555
- * depending on the value. The only valid non-default value is 1,
556
- * which enables image searching.
557
- * For example, `search_type: 1`
558
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
559
- * The query expansion specification that specifies the conditions under which
560
- * query expansion occurs.
561
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
562
- * The spell correction specification that specifies the mode under
563
- * which spell correction takes effect.
564
- * @param {string} request.userPseudoId
565
- * A unique identifier for tracking visitors. For example, this could be
566
- * implemented with an HTTP cookie, which should be able to uniquely identify
567
- * a visitor on a single device. This unique identifier should not change if
568
- * the visitor logs in or out of the website.
569
- *
570
- * This field should NOT have a fixed value such as `unknown_visitor`.
571
- *
572
- * This should be the same identifier as
573
- * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
574
- * and
575
- * {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
576
- *
577
- * The field must be a UTF-8 encoded string with a length limit of 128
578
- * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
579
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
580
- * A specification for configuring the behavior of content search.
581
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
582
- * Uses the provided embedding to do additional semantic document retrieval.
583
- * The retrieval is based on the dot product of
584
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
585
- * and the document embedding that is provided in
586
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
587
- *
588
- * If
589
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
590
- * is not provided, it will use
591
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
592
- * @param {string} request.rankingExpression
593
- * The ranking expression controls the customized ranking on retrieval
594
- * documents. This overrides
595
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
596
- * The ranking expression is a single function or multiple functions that are
597
- * joined by "+".
598
- *
599
- * * ranking_expression = function, { " + ", function };
600
- *
601
- * Supported functions:
602
- *
603
- * * double * relevance_score
604
- * * double * dotProduct(embedding_field_path)
605
- *
606
- * Function variables:
607
- *
608
- * * `relevance_score`: pre-defined keywords, used for measure relevance
609
- * between query and document.
610
- * * `embedding_field_path`: the document embedding field
611
- * used with query embedding vector.
612
- * * `dotProduct`: embedding function between embedding_field_path and query
613
- * embedding vector.
614
- *
615
- * Example ranking expression:
616
- *
617
- * If document has an embedding field doc_embedding, the ranking expression
618
- * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
619
- * @param {boolean} request.safeSearch
620
- * Whether to turn on safe search. This is only supported for
621
- * website search.
622
- * @param {number[]} request.userLabels
623
- * The user labels applied to a resource must meet the following requirements:
624
- *
625
- * * Each resource can have multiple labels, up to a maximum of 64.
626
- * * Each label must be a key-value pair.
627
- * * Keys have a minimum length of 1 character and a maximum length of 63
628
- * characters and cannot be empty. Values can be empty and have a maximum
629
- * length of 63 characters.
630
- * * Keys and values can contain only lowercase letters, numeric characters,
631
- * underscores, and dashes. All characters must use UTF-8 encoding, and
632
- * international characters are allowed.
633
- * * The key portion of a label must be unique. However, you can use the same
634
- * key with multiple resources.
635
- * * Keys must start with a lowercase letter or international character.
636
- *
637
- * See [Google Cloud
638
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
639
- * for more details.
640
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
641
- * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
642
- * natural language query understanding will be done.
643
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
644
- * Search as you type configuration. Only supported for the
645
- * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
646
- * vertical.
647
- * @param {string} request.session
648
- * The session resource name. Optional.
649
- *
650
- * Session allows users to do multi-turn /search API calls or coordination
651
- * between /search API calls and /answer API calls.
652
- *
653
- * Example #1 (multi-turn /search API calls):
654
- * 1. Call /search API with the auto-session mode (see below).
655
- * 2. Call /search API with the session ID generated in the first call.
656
- * Here, the previous search query gets considered in query
657
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
658
- * and the current query is "How about 2023?", the current query will
659
- * be interpreted as "How did Alphabet do in 2023?".
660
- *
661
- * Example #2 (coordination between /search API calls and /answer API calls):
662
- * 1. Call /search API with the auto-session mode (see below).
663
- * 2. Call /answer API with the session ID generated in the first call.
664
- * Here, the answer generation happens in the context of the search
665
- * results from the first search call.
666
- *
667
- * Auto-session mode: when `projects/.../sessions/-` is used, a new session
668
- * gets automatically created. Otherwise, users can use the create-session API
669
- * to create a session manually.
670
- *
671
- * Multi-turn Search feature is currently at private GA stage. Please use
672
- * v1alpha or v1beta version instead before we launch this feature to public
673
- * GA. Or ask for allowlisting through Google Support team.
674
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
675
- * Session specification.
676
- *
677
- * Can be used only when `session` is set.
678
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} request.relevanceThreshold
679
- * The relevance threshold of the search results.
680
- *
681
- * Default to Google defined threshold, leveraging a balance of
682
- * precision and recall to deliver both highly accurate results and
683
- * comprehensive coverage of relevant information.
684
- * @param {google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} request.personalizationSpec
685
- * The specification for personalization.
686
- *
687
- * Notice that if both
688
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}
689
- * and
690
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
691
- * are set,
692
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
693
- * overrides
694
- * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
695
- * @param {object} [options]
696
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
697
- * @returns {Stream}
698
- * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult} on 'data' event.
699
- * The client library will perform auto-pagination by default: it will call the API as many
700
- * times as needed. Note that it can affect your quota.
701
- * We recommend using `searchAsync()`
702
- * method described below for async iteration which you can stop as needed.
703
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
704
- * for more details and examples.
705
- */
706
- searchStream(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Transform;
120
+ * Performs a search.
121
+ *
122
+ * @param {Object} request
123
+ * The request object that will be sent.
124
+ * @param {string} request.servingConfig
125
+ * Required. The resource name of the Search serving config, such as
126
+ * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
127
+ * or
128
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
129
+ * This field is used to identify the serving configuration name, set
130
+ * of models used to make the search.
131
+ * @param {string} request.branch
132
+ * The branch resource name, such as
133
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
134
+ *
135
+ * Use `default_branch` as the branch ID or leave this field empty, to search
136
+ * documents under the default branch.
137
+ * @param {string} request.query
138
+ * Raw search query.
139
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
140
+ * Raw image query.
141
+ * @param {number} request.pageSize
142
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
143
+ * to return. The maximum allowed value depends on the data type. Values above
144
+ * the maximum value are coerced to the maximum value.
145
+ *
146
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
147
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
148
+ * * Other: Default `50`, Maximum `100`.
149
+ *
150
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
151
+ * @param {string} request.pageToken
152
+ * A page token received from a previous
153
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
154
+ * call. Provide this to retrieve the subsequent page.
155
+ *
156
+ * When paginating, all other parameters provided to
157
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
158
+ * must match the call that provided the page token. Otherwise, an
159
+ * `INVALID_ARGUMENT` error is returned.
160
+ * @param {number} request.offset
161
+ * A 0-indexed integer that specifies the current offset (that is, starting
162
+ * result location, amongst the
163
+ * {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
164
+ * as relevant) in search results. This field is only considered if
165
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
166
+ * is unset.
167
+ *
168
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
169
+ * @param {number} request.oneBoxPageSize
170
+ * The maximum number of results to return for OneBox.
171
+ * This applies to each OneBox type individually.
172
+ * Default number is 10.
173
+ * @param {number[]} request.dataStoreSpecs
174
+ * Specs defining dataStores to filter on in a search call and configurations
175
+ * for those dataStores. This is only considered for engines with multiple
176
+ * dataStores use case. For single dataStore within an engine, they should
177
+ * use the specs at the top level.
178
+ * @param {string} request.filter
179
+ * The filter syntax consists of an expression language for constructing a
180
+ * predicate from one or more fields of the documents being filtered. Filter
181
+ * expression is case-sensitive.
182
+ *
183
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
184
+ *
185
+ * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
186
+ * key property defined in the Vertex AI Search backend -- this mapping is
187
+ * defined by the customer in their schema. For example a media customer might
188
+ * have a field 'name' in their schema. In this case the filter would look
189
+ * like this: filter --> name:'ANY("king kong")'
190
+ *
191
+ * For more information about filtering including syntax and filter
192
+ * operators, see
193
+ * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
194
+ * @param {string} request.canonicalFilter
195
+ * The default filter that is applied when a user performs a search without
196
+ * checking any filters on the search page.
197
+ *
198
+ * The filter applied to every search request when quality improvement such as
199
+ * query expansion is needed. In the case a query does not have a sufficient
200
+ * amount of results this filter will be used to determine whether or not to
201
+ * enable the query expansion flow. The original filter will still be used for
202
+ * the query expanded search.
203
+ * This field is strongly recommended to achieve high search quality.
204
+ *
205
+ * For more information about filter syntax, see
206
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.filter|SearchRequest.filter}.
207
+ * @param {string} request.orderBy
208
+ * The order in which documents are returned. Documents can be ordered by
209
+ * a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
210
+ * object. Leave it unset if ordered by relevance. `order_by` expression is
211
+ * case-sensitive.
212
+ *
213
+ * For more information on ordering the website search results, see
214
+ * [Order web search
215
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
216
+ * For more information on ordering the healthcare search results, see
217
+ * [Order healthcare search
218
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
219
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
220
+ * @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
221
+ * Information about the end user.
222
+ * Highly recommended for analytics.
223
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
224
+ * is used to deduce `device_type` for analytics.
225
+ * @param {string} request.languageCode
226
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
227
+ * information, see [Standard
228
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
229
+ * helps to better interpret the query. If a value isn't specified, the query
230
+ * language code is automatically detected, which may not be accurate.
231
+ * @param {string} request.regionCode
232
+ * The Unicode country/region code (CLDR) of a location, such as "US" and
233
+ * "419". For more information, see [Standard
234
+ * fields](https://cloud.google.com/apis/design/standard_fields). If set,
235
+ * then results will be boosted based on the region_code provided.
236
+ * @param {number[]} request.facetSpecs
237
+ * Facet specifications for faceted search. If empty, no facets are returned.
238
+ *
239
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
240
+ * error is returned.
241
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec
242
+ * Boost specification to boost certain documents.
243
+ * For more information on boosting, see
244
+ * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
245
+ * @param {number[]} request.params
246
+ * Additional search parameters.
247
+ *
248
+ * For public website search only, supported values are:
249
+ *
250
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
251
+ * are restricted or boosted based on the location provided.
252
+ * For example, `user_country_code: "au"`
253
+ *
254
+ * For available codes see [Country
255
+ * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
256
+ *
257
+ * * `search_type`: double. Default empty. Enables non-webpage searching
258
+ * depending on the value. The only valid non-default value is 1,
259
+ * which enables image searching.
260
+ * For example, `search_type: 1`
261
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
262
+ * The query expansion specification that specifies the conditions under which
263
+ * query expansion occurs.
264
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
265
+ * The spell correction specification that specifies the mode under
266
+ * which spell correction takes effect.
267
+ * @param {string} request.userPseudoId
268
+ * A unique identifier for tracking visitors. For example, this could be
269
+ * implemented with an HTTP cookie, which should be able to uniquely identify
270
+ * a visitor on a single device. This unique identifier should not change if
271
+ * the visitor logs in or out of the website.
272
+ *
273
+ * This field should NOT have a fixed value such as `unknown_visitor`.
274
+ *
275
+ * This should be the same identifier as
276
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
277
+ * and
278
+ * {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
279
+ *
280
+ * The field must be a UTF-8 encoded string with a length limit of 128
281
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
282
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
283
+ * A specification for configuring the behavior of content search.
284
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
285
+ * Uses the provided embedding to do additional semantic document retrieval.
286
+ * The retrieval is based on the dot product of
287
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
288
+ * and the document embedding that is provided in
289
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
290
+ *
291
+ * If
292
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
293
+ * is not provided, it will use
294
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
295
+ * @param {string} request.rankingExpression
296
+ * The ranking expression controls the customized ranking on retrieval
297
+ * documents. This overrides
298
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
299
+ * The ranking expression is a single function or multiple functions that are
300
+ * joined by "+".
301
+ *
302
+ * * ranking_expression = function, { " + ", function };
303
+ *
304
+ * Supported functions:
305
+ *
306
+ * * double * relevance_score
307
+ * * double * dotProduct(embedding_field_path)
308
+ *
309
+ * Function variables:
310
+ *
311
+ * * `relevance_score`: pre-defined keywords, used for measure relevance
312
+ * between query and document.
313
+ * * `embedding_field_path`: the document embedding field
314
+ * used with query embedding vector.
315
+ * * `dotProduct`: embedding function between embedding_field_path and query
316
+ * embedding vector.
317
+ *
318
+ * Example ranking expression:
319
+ *
320
+ * If document has an embedding field doc_embedding, the ranking expression
321
+ * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
322
+ * @param {boolean} request.safeSearch
323
+ * Whether to turn on safe search. This is only supported for
324
+ * website search.
325
+ * @param {number[]} request.userLabels
326
+ * The user labels applied to a resource must meet the following requirements:
327
+ *
328
+ * * Each resource can have multiple labels, up to a maximum of 64.
329
+ * * Each label must be a key-value pair.
330
+ * * Keys have a minimum length of 1 character and a maximum length of 63
331
+ * characters and cannot be empty. Values can be empty and have a maximum
332
+ * length of 63 characters.
333
+ * * Keys and values can contain only lowercase letters, numeric characters,
334
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
335
+ * international characters are allowed.
336
+ * * The key portion of a label must be unique. However, you can use the same
337
+ * key with multiple resources.
338
+ * * Keys must start with a lowercase letter or international character.
339
+ *
340
+ * See [Google Cloud
341
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
342
+ * for more details.
343
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
344
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
345
+ * natural language query understanding will be done.
346
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
347
+ * Search as you type configuration. Only supported for the
348
+ * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
349
+ * vertical.
350
+ * @param {string} request.session
351
+ * The session resource name. Optional.
352
+ *
353
+ * Session allows users to do multi-turn /search API calls or coordination
354
+ * between /search API calls and /answer API calls.
355
+ *
356
+ * Example #1 (multi-turn /search API calls):
357
+ * 1. Call /search API with the auto-session mode (see below).
358
+ * 2. Call /search API with the session ID generated in the first call.
359
+ * Here, the previous search query gets considered in query
360
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
361
+ * and the current query is "How about 2023?", the current query will
362
+ * be interpreted as "How did Alphabet do in 2023?".
363
+ *
364
+ * Example #2 (coordination between /search API calls and /answer API calls):
365
+ * 1. Call /search API with the auto-session mode (see below).
366
+ * 2. Call /answer API with the session ID generated in the first call.
367
+ * Here, the answer generation happens in the context of the search
368
+ * results from the first search call.
369
+ *
370
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
371
+ * gets automatically created. Otherwise, users can use the create-session API
372
+ * to create a session manually.
373
+ *
374
+ * Multi-turn Search feature is currently at private GA stage. Please use
375
+ * v1alpha or v1beta version instead before we launch this feature to public
376
+ * GA. Or ask for allowlisting through Google Support team.
377
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
378
+ * Session specification.
379
+ *
380
+ * Can be used only when `session` is set.
381
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} request.relevanceThreshold
382
+ * The relevance threshold of the search results.
383
+ *
384
+ * Default to Google defined threshold, leveraging a balance of
385
+ * precision and recall to deliver both highly accurate results and
386
+ * comprehensive coverage of relevant information.
387
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} request.personalizationSpec
388
+ * The specification for personalization.
389
+ *
390
+ * Notice that if both
391
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}
392
+ * and
393
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
394
+ * are set,
395
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
396
+ * overrides
397
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
398
+ * @param {object} [options]
399
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
400
+ * @returns {Promise} - The promise which resolves to an array.
401
+ * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}.
402
+ * The client library will perform auto-pagination by default: it will call the API as many
403
+ * times as needed and will merge results from all the pages into this array.
404
+ * Note that it can affect your quota.
405
+ * We recommend using `searchAsync()`
406
+ * method described below for async iteration which you can stop as needed.
407
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
408
+ * for more details and examples.
409
+ */
410
+ search(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Promise<[
411
+ protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[],
412
+ protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null,
413
+ protos.google.cloud.discoveryengine.v1beta.ISearchResponse
414
+ ]>;
415
+ search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
416
+ search(request: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, callback: PaginationCallback<protos.google.cloud.discoveryengine.v1beta.ISearchRequest, protos.google.cloud.discoveryengine.v1beta.ISearchResponse | null | undefined, protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>): void;
707
417
  /**
708
- * Equivalent to `search`, but returns an iterable object.
709
- *
710
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
418
+ * Equivalent to `search`, but returns a NodeJS Stream object.
711
419
  * @param {Object} request
712
420
  * The request object that will be sent.
713
421
  * @param {string} request.servingConfig
@@ -986,32 +694,20 @@ export declare class SearchServiceClient {
986
694
  * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
987
695
  * @param {object} [options]
988
696
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
989
- * @returns {Object}
990
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
991
- * When you iterate the returned iterable, each element will be an object representing
992
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}. The API will be called under the hood as needed, once per the page,
993
- * so you can stop the iteration when you don't need more results.
697
+ * @returns {Stream}
698
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult} on 'data' event.
699
+ * The client library will perform auto-pagination by default: it will call the API as many
700
+ * times as needed. Note that it can affect your quota.
701
+ * We recommend using `searchAsync()`
702
+ * method described below for async iteration which you can stop as needed.
994
703
  * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
995
704
  * for more details and examples.
996
- * @example <caption>include:samples/generated/v1beta/search_service.search.js</caption>
997
- * region_tag:discoveryengine_v1beta_generated_SearchService_Search_async
998
705
  */
999
- searchAsync(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>;
706
+ searchStream(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Transform;
1000
707
  /**
1001
- * Performs a search. Similar to the
1002
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1003
- * method, but a lite version that allows API key for authentication, where
1004
- * OAuth and IAM checks are not required.
1005
- *
1006
- * Only public website search is supported by this method. If data stores and
1007
- * engines not associated with public website search are specified, a
1008
- * `FAILED_PRECONDITION` error is returned.
1009
- *
1010
- * This method can be used for easy onboarding without having to implement an
1011
- * authentication backend. However, it is strongly recommended to use
1012
- * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1013
- * instead with required OAuth and IAM checks to provide better data security.
708
+ * Equivalent to `search`, but returns an iterable object.
1014
709
  *
710
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1015
711
  * @param {Object} request
1016
712
  * The request object that will be sent.
1017
713
  * @param {string} request.servingConfig
@@ -1290,16 +986,320 @@ export declare class SearchServiceClient {
1290
986
  * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
1291
987
  * @param {object} [options]
1292
988
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1293
- * @returns {Promise} - The promise which resolves to an array.
1294
- * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}.
1295
- * The client library will perform auto-pagination by default: it will call the API as many
1296
- * times as needed and will merge results from all the pages into this array.
1297
- * Note that it can affect your quota.
1298
- * We recommend using `searchLiteAsync()`
1299
- * method described below for async iteration which you can stop as needed.
989
+ * @returns {Object}
990
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
991
+ * When you iterate the returned iterable, each element will be an object representing
992
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}. The API will be called under the hood as needed, once per the page,
993
+ * so you can stop the iteration when you don't need more results.
1300
994
  * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1301
995
  * for more details and examples.
996
+ * @example <caption>include:samples/generated/v1beta/search_service.search.js</caption>
997
+ * region_tag:discoveryengine_v1beta_generated_SearchService_Search_async
1302
998
  */
999
+ searchAsync(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>;
1000
+ /**
1001
+ * Performs a search. Similar to the
1002
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1003
+ * method, but a lite version that allows API key for authentication, where
1004
+ * OAuth and IAM checks are not required.
1005
+ *
1006
+ * Only public website search is supported by this method. If data stores and
1007
+ * engines not associated with public website search are specified, a
1008
+ * `FAILED_PRECONDITION` error is returned.
1009
+ *
1010
+ * This method can be used for easy onboarding without having to implement an
1011
+ * authentication backend. However, it is strongly recommended to use
1012
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1013
+ * instead with required OAuth and IAM checks to provide better data security.
1014
+ *
1015
+ * @param {Object} request
1016
+ * The request object that will be sent.
1017
+ * @param {string} request.servingConfig
1018
+ * Required. The resource name of the Search serving config, such as
1019
+ * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
1020
+ * or
1021
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
1022
+ * This field is used to identify the serving configuration name, set
1023
+ * of models used to make the search.
1024
+ * @param {string} request.branch
1025
+ * The branch resource name, such as
1026
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
1027
+ *
1028
+ * Use `default_branch` as the branch ID or leave this field empty, to search
1029
+ * documents under the default branch.
1030
+ * @param {string} request.query
1031
+ * Raw search query.
1032
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
1033
+ * Raw image query.
1034
+ * @param {number} request.pageSize
1035
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
1036
+ * to return. The maximum allowed value depends on the data type. Values above
1037
+ * the maximum value are coerced to the maximum value.
1038
+ *
1039
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
1040
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
1041
+ * * Other: Default `50`, Maximum `100`.
1042
+ *
1043
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
1044
+ * @param {string} request.pageToken
1045
+ * A page token received from a previous
1046
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1047
+ * call. Provide this to retrieve the subsequent page.
1048
+ *
1049
+ * When paginating, all other parameters provided to
1050
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
1051
+ * must match the call that provided the page token. Otherwise, an
1052
+ * `INVALID_ARGUMENT` error is returned.
1053
+ * @param {number} request.offset
1054
+ * A 0-indexed integer that specifies the current offset (that is, starting
1055
+ * result location, amongst the
1056
+ * {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
1057
+ * as relevant) in search results. This field is only considered if
1058
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
1059
+ * is unset.
1060
+ *
1061
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
1062
+ * @param {number} request.oneBoxPageSize
1063
+ * The maximum number of results to return for OneBox.
1064
+ * This applies to each OneBox type individually.
1065
+ * Default number is 10.
1066
+ * @param {number[]} request.dataStoreSpecs
1067
+ * Specs defining dataStores to filter on in a search call and configurations
1068
+ * for those dataStores. This is only considered for engines with multiple
1069
+ * dataStores use case. For single dataStore within an engine, they should
1070
+ * use the specs at the top level.
1071
+ * @param {string} request.filter
1072
+ * The filter syntax consists of an expression language for constructing a
1073
+ * predicate from one or more fields of the documents being filtered. Filter
1074
+ * expression is case-sensitive.
1075
+ *
1076
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
1077
+ *
1078
+ * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
1079
+ * key property defined in the Vertex AI Search backend -- this mapping is
1080
+ * defined by the customer in their schema. For example a media customer might
1081
+ * have a field 'name' in their schema. In this case the filter would look
1082
+ * like this: filter --> name:'ANY("king kong")'
1083
+ *
1084
+ * For more information about filtering including syntax and filter
1085
+ * operators, see
1086
+ * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
1087
+ * @param {string} request.canonicalFilter
1088
+ * The default filter that is applied when a user performs a search without
1089
+ * checking any filters on the search page.
1090
+ *
1091
+ * The filter applied to every search request when quality improvement such as
1092
+ * query expansion is needed. In the case a query does not have a sufficient
1093
+ * amount of results this filter will be used to determine whether or not to
1094
+ * enable the query expansion flow. The original filter will still be used for
1095
+ * the query expanded search.
1096
+ * This field is strongly recommended to achieve high search quality.
1097
+ *
1098
+ * For more information about filter syntax, see
1099
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.filter|SearchRequest.filter}.
1100
+ * @param {string} request.orderBy
1101
+ * The order in which documents are returned. Documents can be ordered by
1102
+ * a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
1103
+ * object. Leave it unset if ordered by relevance. `order_by` expression is
1104
+ * case-sensitive.
1105
+ *
1106
+ * For more information on ordering the website search results, see
1107
+ * [Order web search
1108
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
1109
+ * For more information on ordering the healthcare search results, see
1110
+ * [Order healthcare search
1111
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
1112
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
1113
+ * @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
1114
+ * Information about the end user.
1115
+ * Highly recommended for analytics.
1116
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
1117
+ * is used to deduce `device_type` for analytics.
1118
+ * @param {string} request.languageCode
1119
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1120
+ * information, see [Standard
1121
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
1122
+ * helps to better interpret the query. If a value isn't specified, the query
1123
+ * language code is automatically detected, which may not be accurate.
1124
+ * @param {string} request.regionCode
1125
+ * The Unicode country/region code (CLDR) of a location, such as "US" and
1126
+ * "419". For more information, see [Standard
1127
+ * fields](https://cloud.google.com/apis/design/standard_fields). If set,
1128
+ * then results will be boosted based on the region_code provided.
1129
+ * @param {number[]} request.facetSpecs
1130
+ * Facet specifications for faceted search. If empty, no facets are returned.
1131
+ *
1132
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
1133
+ * error is returned.
1134
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec} request.boostSpec
1135
+ * Boost specification to boost certain documents.
1136
+ * For more information on boosting, see
1137
+ * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
1138
+ * @param {number[]} request.params
1139
+ * Additional search parameters.
1140
+ *
1141
+ * For public website search only, supported values are:
1142
+ *
1143
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
1144
+ * are restricted or boosted based on the location provided.
1145
+ * For example, `user_country_code: "au"`
1146
+ *
1147
+ * For available codes see [Country
1148
+ * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
1149
+ *
1150
+ * * `search_type`: double. Default empty. Enables non-webpage searching
1151
+ * depending on the value. The only valid non-default value is 1,
1152
+ * which enables image searching.
1153
+ * For example, `search_type: 1`
1154
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
1155
+ * The query expansion specification that specifies the conditions under which
1156
+ * query expansion occurs.
1157
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
1158
+ * The spell correction specification that specifies the mode under
1159
+ * which spell correction takes effect.
1160
+ * @param {string} request.userPseudoId
1161
+ * A unique identifier for tracking visitors. For example, this could be
1162
+ * implemented with an HTTP cookie, which should be able to uniquely identify
1163
+ * a visitor on a single device. This unique identifier should not change if
1164
+ * the visitor logs in or out of the website.
1165
+ *
1166
+ * This field should NOT have a fixed value such as `unknown_visitor`.
1167
+ *
1168
+ * This should be the same identifier as
1169
+ * {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
1170
+ * and
1171
+ * {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
1172
+ *
1173
+ * The field must be a UTF-8 encoded string with a length limit of 128
1174
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
1175
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
1176
+ * A specification for configuring the behavior of content search.
1177
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
1178
+ * Uses the provided embedding to do additional semantic document retrieval.
1179
+ * The retrieval is based on the dot product of
1180
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
1181
+ * and the document embedding that is provided in
1182
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
1183
+ *
1184
+ * If
1185
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
1186
+ * is not provided, it will use
1187
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
1188
+ * @param {string} request.rankingExpression
1189
+ * The ranking expression controls the customized ranking on retrieval
1190
+ * documents. This overrides
1191
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
1192
+ * The ranking expression is a single function or multiple functions that are
1193
+ * joined by "+".
1194
+ *
1195
+ * * ranking_expression = function, { " + ", function };
1196
+ *
1197
+ * Supported functions:
1198
+ *
1199
+ * * double * relevance_score
1200
+ * * double * dotProduct(embedding_field_path)
1201
+ *
1202
+ * Function variables:
1203
+ *
1204
+ * * `relevance_score`: pre-defined keywords, used for measure relevance
1205
+ * between query and document.
1206
+ * * `embedding_field_path`: the document embedding field
1207
+ * used with query embedding vector.
1208
+ * * `dotProduct`: embedding function between embedding_field_path and query
1209
+ * embedding vector.
1210
+ *
1211
+ * Example ranking expression:
1212
+ *
1213
+ * If document has an embedding field doc_embedding, the ranking expression
1214
+ * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
1215
+ * @param {boolean} request.safeSearch
1216
+ * Whether to turn on safe search. This is only supported for
1217
+ * website search.
1218
+ * @param {number[]} request.userLabels
1219
+ * The user labels applied to a resource must meet the following requirements:
1220
+ *
1221
+ * * Each resource can have multiple labels, up to a maximum of 64.
1222
+ * * Each label must be a key-value pair.
1223
+ * * Keys have a minimum length of 1 character and a maximum length of 63
1224
+ * characters and cannot be empty. Values can be empty and have a maximum
1225
+ * length of 63 characters.
1226
+ * * Keys and values can contain only lowercase letters, numeric characters,
1227
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
1228
+ * international characters are allowed.
1229
+ * * The key portion of a label must be unique. However, you can use the same
1230
+ * key with multiple resources.
1231
+ * * Keys must start with a lowercase letter or international character.
1232
+ *
1233
+ * See [Google Cloud
1234
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1235
+ * for more details.
1236
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
1237
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
1238
+ * natural language query understanding will be done.
1239
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1240
+ * Search as you type configuration. Only supported for the
1241
+ * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1242
+ * vertical.
1243
+ * @param {string} request.session
1244
+ * The session resource name. Optional.
1245
+ *
1246
+ * Session allows users to do multi-turn /search API calls or coordination
1247
+ * between /search API calls and /answer API calls.
1248
+ *
1249
+ * Example #1 (multi-turn /search API calls):
1250
+ * 1. Call /search API with the auto-session mode (see below).
1251
+ * 2. Call /search API with the session ID generated in the first call.
1252
+ * Here, the previous search query gets considered in query
1253
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1254
+ * and the current query is "How about 2023?", the current query will
1255
+ * be interpreted as "How did Alphabet do in 2023?".
1256
+ *
1257
+ * Example #2 (coordination between /search API calls and /answer API calls):
1258
+ * 1. Call /search API with the auto-session mode (see below).
1259
+ * 2. Call /answer API with the session ID generated in the first call.
1260
+ * Here, the answer generation happens in the context of the search
1261
+ * results from the first search call.
1262
+ *
1263
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
1264
+ * gets automatically created. Otherwise, users can use the create-session API
1265
+ * to create a session manually.
1266
+ *
1267
+ * Multi-turn Search feature is currently at private GA stage. Please use
1268
+ * v1alpha or v1beta version instead before we launch this feature to public
1269
+ * GA. Or ask for allowlisting through Google Support team.
1270
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
1271
+ * Session specification.
1272
+ *
1273
+ * Can be used only when `session` is set.
1274
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1275
+ * The relevance threshold of the search results.
1276
+ *
1277
+ * Default to Google defined threshold, leveraging a balance of
1278
+ * precision and recall to deliver both highly accurate results and
1279
+ * comprehensive coverage of relevant information.
1280
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} request.personalizationSpec
1281
+ * The specification for personalization.
1282
+ *
1283
+ * Notice that if both
1284
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}
1285
+ * and
1286
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
1287
+ * are set,
1288
+ * {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec|SearchRequest.personalization_spec}
1289
+ * overrides
1290
+ * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec|ServingConfig.personalization_spec}.
1291
+ * @param {object} [options]
1292
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1293
+ * @returns {Promise} - The promise which resolves to an array.
1294
+ * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}.
1295
+ * The client library will perform auto-pagination by default: it will call the API as many
1296
+ * times as needed and will merge results from all the pages into this array.
1297
+ * Note that it can affect your quota.
1298
+ * We recommend using `searchLiteAsync()`
1299
+ * method described below for async iteration which you can stop as needed.
1300
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1301
+ * for more details and examples.
1302
+ */
1303
1303
  searchLite(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Promise<[
1304
1304
  protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult[],
1305
1305
  protos.google.cloud.discoveryengine.v1beta.ISearchRequest | null,
@@ -1891,55 +1891,55 @@ export declare class SearchServiceClient {
1891
1891
  */
1892
1892
  searchLiteAsync(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>;
1893
1893
  /**
1894
- * Gets information about a location.
1895
- *
1896
- * @param {Object} request
1897
- * The request object that will be sent.
1898
- * @param {string} request.name
1899
- * Resource name for the location.
1900
- * @param {object} [options]
1901
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1902
- * @returns {Promise} - The promise which resolves to an array.
1903
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1904
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1905
- * for more details and examples.
1906
- * @example
1907
- * ```
1908
- * const [response] = await client.getLocation(request);
1909
- * ```
1910
- */
1894
+ * Gets information about a location.
1895
+ *
1896
+ * @param {Object} request
1897
+ * The request object that will be sent.
1898
+ * @param {string} request.name
1899
+ * Resource name for the location.
1900
+ * @param {object} [options]
1901
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1902
+ * @returns {Promise} - The promise which resolves to an array.
1903
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1904
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1905
+ * for more details and examples.
1906
+ * @example
1907
+ * ```
1908
+ * const [response] = await client.getLocation(request);
1909
+ * ```
1910
+ */
1911
1911
  getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
1912
1912
  /**
1913
- * Lists information about the supported locations for this service. Returns an iterable object.
1914
- *
1915
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1916
- * @param {Object} request
1917
- * The request object that will be sent.
1918
- * @param {string} request.name
1919
- * The resource that owns the locations collection, if applicable.
1920
- * @param {string} request.filter
1921
- * The standard list filter.
1922
- * @param {number} request.pageSize
1923
- * The standard list page size.
1924
- * @param {string} request.pageToken
1925
- * The standard list page token.
1926
- * @param {object} [options]
1927
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1928
- * @returns {Object}
1929
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1930
- * When you iterate the returned iterable, each element will be an object representing
1931
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1932
- * so you can stop the iteration when you don't need more results.
1933
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1934
- * for more details and examples.
1935
- * @example
1936
- * ```
1937
- * const iterable = client.listLocationsAsync(request);
1938
- * for await (const response of iterable) {
1939
- * // process response
1940
- * }
1941
- * ```
1942
- */
1913
+ * Lists information about the supported locations for this service. Returns an iterable object.
1914
+ *
1915
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1916
+ * @param {Object} request
1917
+ * The request object that will be sent.
1918
+ * @param {string} request.name
1919
+ * The resource that owns the locations collection, if applicable.
1920
+ * @param {string} request.filter
1921
+ * The standard list filter.
1922
+ * @param {number} request.pageSize
1923
+ * The standard list page size.
1924
+ * @param {string} request.pageToken
1925
+ * The standard list page token.
1926
+ * @param {object} [options]
1927
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1928
+ * @returns {Object}
1929
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1930
+ * When you iterate the returned iterable, each element will be an object representing
1931
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1932
+ * so you can stop the iteration when you don't need more results.
1933
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1934
+ * for more details and examples.
1935
+ * @example
1936
+ * ```
1937
+ * const iterable = client.listLocationsAsync(request);
1938
+ * for await (const response of iterable) {
1939
+ * // process response
1940
+ * }
1941
+ * ```
1942
+ */
1943
1943
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
1944
1944
  /**
1945
1945
  * Return a fully-qualified engine resource name string.