@google-cloud/discoveryengine 1.2.0 → 1.3.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.
- package/CHANGELOG.md +7 -0
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +39 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +26 -3
- package/build/protos/protos.d.ts +5578 -1800
- package/build/protos/protos.js +14034 -5272
- package/build/protos/protos.json +1337 -340
- package/build/src/v1alpha/completion_service_client.d.ts +42 -0
- package/build/src/v1alpha/completion_service_client.js +58 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +42 -0
- package/build/src/v1alpha/conversational_search_service_client.js +58 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
- package/build/src/v1alpha/data_store_service_client.js +1431 -0
- package/build/src/v1alpha/data_store_service_client_config.json +46 -0
- package/build/src/v1alpha/document_service_client.d.ts +117 -0
- package/build/src/v1alpha/document_service_client.js +162 -0
- package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
- package/build/src/v1alpha/engine_service_client.js +1481 -0
- package/build/src/v1alpha/engine_service_client_config.json +58 -0
- package/build/src/v1alpha/index.d.ts +2 -0
- package/build/src/v1alpha/index.js +5 -1
- package/build/src/v1alpha/recommendation_service_client.d.ts +126 -3
- package/build/src/v1alpha/recommendation_service_client.js +162 -0
- package/build/src/v1alpha/schema_service_client.d.ts +42 -0
- package/build/src/v1alpha/schema_service_client.js +58 -0
- package/build/src/v1alpha/search_service_client.d.ts +195 -9
- package/build/src/v1alpha/search_service_client.js +214 -6
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +117 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +162 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +42 -0
- package/build/src/v1alpha/user_event_service_client.js +58 -0
- package/package.json +3 -3
@@ -114,6 +114,8 @@ export declare class SearchServiceClient {
|
|
114
114
|
* The request object that will be sent.
|
115
115
|
* @param {string} request.servingConfig
|
116
116
|
* Required. The resource name of the Search serving config, such as
|
117
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
118
|
+
* or
|
117
119
|
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
118
120
|
* This field is used to identify the serving configuration name, set
|
119
121
|
* of models used to make the search.
|
@@ -158,11 +160,22 @@ export declare class SearchServiceClient {
|
|
158
160
|
* expression is case-sensitive.
|
159
161
|
*
|
160
162
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
163
|
+
*
|
164
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
165
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
166
|
+
* defined by the customer in their schema. For example a media customer might
|
167
|
+
* have a field 'name' in their schema. In this case the filter would look
|
168
|
+
* like this: filter --> name:'ANY("king kong")'
|
169
|
+
*
|
170
|
+
* For more information about filtering including syntax and filter
|
171
|
+
* operators, see
|
172
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
161
173
|
* @param {string} request.orderBy
|
162
174
|
* The order in which documents are returned. Documents can be ordered by
|
163
175
|
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
164
176
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
165
|
-
* case-sensitive.
|
177
|
+
* case-sensitive. For more information on ordering, see
|
178
|
+
* [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
166
179
|
*
|
167
180
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
168
181
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
@@ -177,6 +190,8 @@ export declare class SearchServiceClient {
|
|
177
190
|
* error is returned.
|
178
191
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
179
192
|
* Boost specification to boost certain documents.
|
193
|
+
* For more information on boosting, see
|
194
|
+
* [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
180
195
|
* @param {number[]} request.params
|
181
196
|
* Additional search parameters.
|
182
197
|
*
|
@@ -184,9 +199,17 @@ export declare class SearchServiceClient {
|
|
184
199
|
*
|
185
200
|
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
186
201
|
* are restricted or boosted based on the location provided.
|
202
|
+
* Example:
|
203
|
+
* user_country_code: "au"
|
204
|
+
*
|
205
|
+
* For available codes see [Country
|
206
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
207
|
+
*
|
187
208
|
* * `search_type`: double. Default empty. Enables non-webpage searching
|
188
|
-
*
|
189
|
-
*
|
209
|
+
* depending on the value. The only valid non-default value is 1,
|
210
|
+
* which enables image searching.
|
211
|
+
* Example:
|
212
|
+
* search_type: 1
|
190
213
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
191
214
|
* The query expansion specification that specifies the conditions under which
|
192
215
|
* query expansion occurs.
|
@@ -286,6 +309,8 @@ export declare class SearchServiceClient {
|
|
286
309
|
* The request object that will be sent.
|
287
310
|
* @param {string} request.servingConfig
|
288
311
|
* Required. The resource name of the Search serving config, such as
|
312
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
313
|
+
* or
|
289
314
|
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
290
315
|
* This field is used to identify the serving configuration name, set
|
291
316
|
* of models used to make the search.
|
@@ -330,11 +355,22 @@ export declare class SearchServiceClient {
|
|
330
355
|
* expression is case-sensitive.
|
331
356
|
*
|
332
357
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
358
|
+
*
|
359
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
360
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
361
|
+
* defined by the customer in their schema. For example a media customer might
|
362
|
+
* have a field 'name' in their schema. In this case the filter would look
|
363
|
+
* like this: filter --> name:'ANY("king kong")'
|
364
|
+
*
|
365
|
+
* For more information about filtering including syntax and filter
|
366
|
+
* operators, see
|
367
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
333
368
|
* @param {string} request.orderBy
|
334
369
|
* The order in which documents are returned. Documents can be ordered by
|
335
370
|
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
336
371
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
337
|
-
* case-sensitive.
|
372
|
+
* case-sensitive. For more information on ordering, see
|
373
|
+
* [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
338
374
|
*
|
339
375
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
340
376
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
@@ -349,6 +385,8 @@ export declare class SearchServiceClient {
|
|
349
385
|
* error is returned.
|
350
386
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
351
387
|
* Boost specification to boost certain documents.
|
388
|
+
* For more information on boosting, see
|
389
|
+
* [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
352
390
|
* @param {number[]} request.params
|
353
391
|
* Additional search parameters.
|
354
392
|
*
|
@@ -356,9 +394,17 @@ export declare class SearchServiceClient {
|
|
356
394
|
*
|
357
395
|
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
358
396
|
* are restricted or boosted based on the location provided.
|
397
|
+
* Example:
|
398
|
+
* user_country_code: "au"
|
399
|
+
*
|
400
|
+
* For available codes see [Country
|
401
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
402
|
+
*
|
359
403
|
* * `search_type`: double. Default empty. Enables non-webpage searching
|
360
|
-
*
|
361
|
-
*
|
404
|
+
* depending on the value. The only valid non-default value is 1,
|
405
|
+
* which enables image searching.
|
406
|
+
* Example:
|
407
|
+
* search_type: 1
|
362
408
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
363
409
|
* The query expansion specification that specifies the conditions under which
|
364
410
|
* query expansion occurs.
|
@@ -453,6 +499,8 @@ export declare class SearchServiceClient {
|
|
453
499
|
* The request object that will be sent.
|
454
500
|
* @param {string} request.servingConfig
|
455
501
|
* Required. The resource name of the Search serving config, such as
|
502
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
503
|
+
* or
|
456
504
|
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
457
505
|
* This field is used to identify the serving configuration name, set
|
458
506
|
* of models used to make the search.
|
@@ -497,11 +545,22 @@ export declare class SearchServiceClient {
|
|
497
545
|
* expression is case-sensitive.
|
498
546
|
*
|
499
547
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
548
|
+
*
|
549
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
550
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
551
|
+
* defined by the customer in their schema. For example a media customer might
|
552
|
+
* have a field 'name' in their schema. In this case the filter would look
|
553
|
+
* like this: filter --> name:'ANY("king kong")'
|
554
|
+
*
|
555
|
+
* For more information about filtering including syntax and filter
|
556
|
+
* operators, see
|
557
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
500
558
|
* @param {string} request.orderBy
|
501
559
|
* The order in which documents are returned. Documents can be ordered by
|
502
560
|
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
503
561
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
504
|
-
* case-sensitive.
|
562
|
+
* case-sensitive. For more information on ordering, see
|
563
|
+
* [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
505
564
|
*
|
506
565
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
507
566
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
@@ -516,6 +575,8 @@ export declare class SearchServiceClient {
|
|
516
575
|
* error is returned.
|
517
576
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
518
577
|
* Boost specification to boost certain documents.
|
578
|
+
* For more information on boosting, see
|
579
|
+
* [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
519
580
|
* @param {number[]} request.params
|
520
581
|
* Additional search parameters.
|
521
582
|
*
|
@@ -523,9 +584,17 @@ export declare class SearchServiceClient {
|
|
523
584
|
*
|
524
585
|
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
525
586
|
* are restricted or boosted based on the location provided.
|
587
|
+
* Example:
|
588
|
+
* user_country_code: "au"
|
589
|
+
*
|
590
|
+
* For available codes see [Country
|
591
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
592
|
+
*
|
526
593
|
* * `search_type`: double. Default empty. Enables non-webpage searching
|
527
|
-
*
|
528
|
-
*
|
594
|
+
* depending on the value. The only valid non-default value is 1,
|
595
|
+
* which enables image searching.
|
596
|
+
* Example:
|
597
|
+
* search_type: 1
|
529
598
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
530
599
|
* The query expansion specification that specifies the conditions under which
|
531
600
|
* query expansion occurs.
|
@@ -664,6 +733,90 @@ export declare class SearchServiceClient {
|
|
664
733
|
* ```
|
665
734
|
*/
|
666
735
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
736
|
+
/**
|
737
|
+
* Return a fully-qualified engine resource name string.
|
738
|
+
*
|
739
|
+
* @param {string} project
|
740
|
+
* @param {string} location
|
741
|
+
* @param {string} collection
|
742
|
+
* @param {string} engine
|
743
|
+
* @returns {string} Resource name string.
|
744
|
+
*/
|
745
|
+
enginePath(project: string, location: string, collection: string, engine: string): string;
|
746
|
+
/**
|
747
|
+
* Parse the project from Engine resource.
|
748
|
+
*
|
749
|
+
* @param {string} engineName
|
750
|
+
* A fully-qualified path representing Engine resource.
|
751
|
+
* @returns {string} A string representing the project.
|
752
|
+
*/
|
753
|
+
matchProjectFromEngineName(engineName: string): string | number;
|
754
|
+
/**
|
755
|
+
* Parse the location from Engine resource.
|
756
|
+
*
|
757
|
+
* @param {string} engineName
|
758
|
+
* A fully-qualified path representing Engine resource.
|
759
|
+
* @returns {string} A string representing the location.
|
760
|
+
*/
|
761
|
+
matchLocationFromEngineName(engineName: string): string | number;
|
762
|
+
/**
|
763
|
+
* Parse the collection from Engine resource.
|
764
|
+
*
|
765
|
+
* @param {string} engineName
|
766
|
+
* A fully-qualified path representing Engine resource.
|
767
|
+
* @returns {string} A string representing the collection.
|
768
|
+
*/
|
769
|
+
matchCollectionFromEngineName(engineName: string): string | number;
|
770
|
+
/**
|
771
|
+
* Parse the engine from Engine resource.
|
772
|
+
*
|
773
|
+
* @param {string} engineName
|
774
|
+
* A fully-qualified path representing Engine resource.
|
775
|
+
* @returns {string} A string representing the engine.
|
776
|
+
*/
|
777
|
+
matchEngineFromEngineName(engineName: string): string | number;
|
778
|
+
/**
|
779
|
+
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
780
|
+
*
|
781
|
+
* @param {string} project
|
782
|
+
* @param {string} location
|
783
|
+
* @param {string} collection
|
784
|
+
* @param {string} data_store
|
785
|
+
* @returns {string} Resource name string.
|
786
|
+
*/
|
787
|
+
projectLocationCollectionDataStorePath(project: string, location: string, collection: string, dataStore: string): string;
|
788
|
+
/**
|
789
|
+
* Parse the project from ProjectLocationCollectionDataStore resource.
|
790
|
+
*
|
791
|
+
* @param {string} projectLocationCollectionDataStoreName
|
792
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
793
|
+
* @returns {string} A string representing the project.
|
794
|
+
*/
|
795
|
+
matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
796
|
+
/**
|
797
|
+
* Parse the location from ProjectLocationCollectionDataStore resource.
|
798
|
+
*
|
799
|
+
* @param {string} projectLocationCollectionDataStoreName
|
800
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
801
|
+
* @returns {string} A string representing the location.
|
802
|
+
*/
|
803
|
+
matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
804
|
+
/**
|
805
|
+
* Parse the collection from ProjectLocationCollectionDataStore resource.
|
806
|
+
*
|
807
|
+
* @param {string} projectLocationCollectionDataStoreName
|
808
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
809
|
+
* @returns {string} A string representing the collection.
|
810
|
+
*/
|
811
|
+
matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
812
|
+
/**
|
813
|
+
* Parse the data_store from ProjectLocationCollectionDataStore resource.
|
814
|
+
*
|
815
|
+
* @param {string} projectLocationCollectionDataStoreName
|
816
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
817
|
+
* @returns {string} A string representing the data_store.
|
818
|
+
*/
|
819
|
+
matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
667
820
|
/**
|
668
821
|
* Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string.
|
669
822
|
*
|
@@ -979,6 +1132,39 @@ export declare class SearchServiceClient {
|
|
979
1132
|
* @returns {string} A string representing the serving_config.
|
980
1133
|
*/
|
981
1134
|
matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName: string): string | number;
|
1135
|
+
/**
|
1136
|
+
* Return a fully-qualified projectLocationDataStore resource name string.
|
1137
|
+
*
|
1138
|
+
* @param {string} project
|
1139
|
+
* @param {string} location
|
1140
|
+
* @param {string} data_store
|
1141
|
+
* @returns {string} Resource name string.
|
1142
|
+
*/
|
1143
|
+
projectLocationDataStorePath(project: string, location: string, dataStore: string): string;
|
1144
|
+
/**
|
1145
|
+
* Parse the project from ProjectLocationDataStore resource.
|
1146
|
+
*
|
1147
|
+
* @param {string} projectLocationDataStoreName
|
1148
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1149
|
+
* @returns {string} A string representing the project.
|
1150
|
+
*/
|
1151
|
+
matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
1152
|
+
/**
|
1153
|
+
* Parse the location from ProjectLocationDataStore resource.
|
1154
|
+
*
|
1155
|
+
* @param {string} projectLocationDataStoreName
|
1156
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1157
|
+
* @returns {string} A string representing the location.
|
1158
|
+
*/
|
1159
|
+
matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
1160
|
+
/**
|
1161
|
+
* Parse the data_store from ProjectLocationDataStore resource.
|
1162
|
+
*
|
1163
|
+
* @param {string} projectLocationDataStoreName
|
1164
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1165
|
+
* @returns {string} A string representing the data_store.
|
1166
|
+
*/
|
1167
|
+
matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
982
1168
|
/**
|
983
1169
|
* Return a fully-qualified projectLocationDataStoreBranch resource name string.
|
984
1170
|
*
|
@@ -138,12 +138,15 @@ class SearchServiceClient {
|
|
138
138
|
// identifiers to uniquely identify resources within the API.
|
139
139
|
// Create useful helper objects for these.
|
140
140
|
this.pathTemplates = {
|
141
|
+
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
142
|
+
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
141
143
|
projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
|
142
144
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
145
|
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
144
146
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
145
147
|
projectLocationCollectionDataStoreServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}'),
|
146
148
|
projectLocationCollectionEngineServingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}'),
|
149
|
+
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
147
150
|
projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
|
148
151
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
149
152
|
projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
|
@@ -275,6 +278,8 @@ class SearchServiceClient {
|
|
275
278
|
* The request object that will be sent.
|
276
279
|
* @param {string} request.servingConfig
|
277
280
|
* Required. The resource name of the Search serving config, such as
|
281
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
282
|
+
* or
|
278
283
|
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
279
284
|
* This field is used to identify the serving configuration name, set
|
280
285
|
* of models used to make the search.
|
@@ -319,11 +324,22 @@ class SearchServiceClient {
|
|
319
324
|
* expression is case-sensitive.
|
320
325
|
*
|
321
326
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
327
|
+
*
|
328
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
329
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
330
|
+
* defined by the customer in their schema. For example a media customer might
|
331
|
+
* have a field 'name' in their schema. In this case the filter would look
|
332
|
+
* like this: filter --> name:'ANY("king kong")'
|
333
|
+
*
|
334
|
+
* For more information about filtering including syntax and filter
|
335
|
+
* operators, see
|
336
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
322
337
|
* @param {string} request.orderBy
|
323
338
|
* The order in which documents are returned. Documents can be ordered by
|
324
339
|
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
325
340
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
326
|
-
* case-sensitive.
|
341
|
+
* case-sensitive. For more information on ordering, see
|
342
|
+
* [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
327
343
|
*
|
328
344
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
329
345
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
@@ -338,6 +354,8 @@ class SearchServiceClient {
|
|
338
354
|
* error is returned.
|
339
355
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
340
356
|
* Boost specification to boost certain documents.
|
357
|
+
* For more information on boosting, see
|
358
|
+
* [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
341
359
|
* @param {number[]} request.params
|
342
360
|
* Additional search parameters.
|
343
361
|
*
|
@@ -345,9 +363,17 @@ class SearchServiceClient {
|
|
345
363
|
*
|
346
364
|
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
347
365
|
* are restricted or boosted based on the location provided.
|
366
|
+
* Example:
|
367
|
+
* user_country_code: "au"
|
368
|
+
*
|
369
|
+
* For available codes see [Country
|
370
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
371
|
+
*
|
348
372
|
* * `search_type`: double. Default empty. Enables non-webpage searching
|
349
|
-
*
|
350
|
-
*
|
373
|
+
* depending on the value. The only valid non-default value is 1,
|
374
|
+
* which enables image searching.
|
375
|
+
* Example:
|
376
|
+
* search_type: 1
|
351
377
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
352
378
|
* The query expansion specification that specifies the conditions under which
|
353
379
|
* query expansion occurs.
|
@@ -456,6 +482,8 @@ class SearchServiceClient {
|
|
456
482
|
* The request object that will be sent.
|
457
483
|
* @param {string} request.servingConfig
|
458
484
|
* Required. The resource name of the Search serving config, such as
|
485
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
486
|
+
* or
|
459
487
|
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
460
488
|
* This field is used to identify the serving configuration name, set
|
461
489
|
* of models used to make the search.
|
@@ -500,11 +528,22 @@ class SearchServiceClient {
|
|
500
528
|
* expression is case-sensitive.
|
501
529
|
*
|
502
530
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
531
|
+
*
|
532
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
533
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
534
|
+
* defined by the customer in their schema. For example a media customer might
|
535
|
+
* have a field 'name' in their schema. In this case the filter would look
|
536
|
+
* like this: filter --> name:'ANY("king kong")'
|
537
|
+
*
|
538
|
+
* For more information about filtering including syntax and filter
|
539
|
+
* operators, see
|
540
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
503
541
|
* @param {string} request.orderBy
|
504
542
|
* The order in which documents are returned. Documents can be ordered by
|
505
543
|
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
506
544
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
507
|
-
* case-sensitive.
|
545
|
+
* case-sensitive. For more information on ordering, see
|
546
|
+
* [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
508
547
|
*
|
509
548
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
510
549
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
@@ -519,6 +558,8 @@ class SearchServiceClient {
|
|
519
558
|
* error is returned.
|
520
559
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
521
560
|
* Boost specification to boost certain documents.
|
561
|
+
* For more information on boosting, see
|
562
|
+
* [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
522
563
|
* @param {number[]} request.params
|
523
564
|
* Additional search parameters.
|
524
565
|
*
|
@@ -526,9 +567,17 @@ class SearchServiceClient {
|
|
526
567
|
*
|
527
568
|
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
528
569
|
* are restricted or boosted based on the location provided.
|
570
|
+
* Example:
|
571
|
+
* user_country_code: "au"
|
572
|
+
*
|
573
|
+
* For available codes see [Country
|
574
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
575
|
+
*
|
529
576
|
* * `search_type`: double. Default empty. Enables non-webpage searching
|
530
|
-
*
|
531
|
-
*
|
577
|
+
* depending on the value. The only valid non-default value is 1,
|
578
|
+
* which enables image searching.
|
579
|
+
* Example:
|
580
|
+
* search_type: 1
|
532
581
|
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
533
582
|
* The query expansion specification that specifies the conditions under which
|
534
583
|
* query expansion occurs.
|
@@ -688,6 +737,120 @@ class SearchServiceClient {
|
|
688
737
|
// --------------------
|
689
738
|
// -- Path templates --
|
690
739
|
// --------------------
|
740
|
+
/**
|
741
|
+
* Return a fully-qualified engine resource name string.
|
742
|
+
*
|
743
|
+
* @param {string} project
|
744
|
+
* @param {string} location
|
745
|
+
* @param {string} collection
|
746
|
+
* @param {string} engine
|
747
|
+
* @returns {string} Resource name string.
|
748
|
+
*/
|
749
|
+
enginePath(project, location, collection, engine) {
|
750
|
+
return this.pathTemplates.enginePathTemplate.render({
|
751
|
+
project: project,
|
752
|
+
location: location,
|
753
|
+
collection: collection,
|
754
|
+
engine: engine,
|
755
|
+
});
|
756
|
+
}
|
757
|
+
/**
|
758
|
+
* Parse the project from Engine resource.
|
759
|
+
*
|
760
|
+
* @param {string} engineName
|
761
|
+
* A fully-qualified path representing Engine resource.
|
762
|
+
* @returns {string} A string representing the project.
|
763
|
+
*/
|
764
|
+
matchProjectFromEngineName(engineName) {
|
765
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).project;
|
766
|
+
}
|
767
|
+
/**
|
768
|
+
* Parse the location from Engine resource.
|
769
|
+
*
|
770
|
+
* @param {string} engineName
|
771
|
+
* A fully-qualified path representing Engine resource.
|
772
|
+
* @returns {string} A string representing the location.
|
773
|
+
*/
|
774
|
+
matchLocationFromEngineName(engineName) {
|
775
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).location;
|
776
|
+
}
|
777
|
+
/**
|
778
|
+
* Parse the collection from Engine resource.
|
779
|
+
*
|
780
|
+
* @param {string} engineName
|
781
|
+
* A fully-qualified path representing Engine resource.
|
782
|
+
* @returns {string} A string representing the collection.
|
783
|
+
*/
|
784
|
+
matchCollectionFromEngineName(engineName) {
|
785
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).collection;
|
786
|
+
}
|
787
|
+
/**
|
788
|
+
* Parse the engine from Engine resource.
|
789
|
+
*
|
790
|
+
* @param {string} engineName
|
791
|
+
* A fully-qualified path representing Engine resource.
|
792
|
+
* @returns {string} A string representing the engine.
|
793
|
+
*/
|
794
|
+
matchEngineFromEngineName(engineName) {
|
795
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
796
|
+
}
|
797
|
+
/**
|
798
|
+
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
799
|
+
*
|
800
|
+
* @param {string} project
|
801
|
+
* @param {string} location
|
802
|
+
* @param {string} collection
|
803
|
+
* @param {string} data_store
|
804
|
+
* @returns {string} Resource name string.
|
805
|
+
*/
|
806
|
+
projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
|
807
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
|
808
|
+
project: project,
|
809
|
+
location: location,
|
810
|
+
collection: collection,
|
811
|
+
data_store: dataStore,
|
812
|
+
});
|
813
|
+
}
|
814
|
+
/**
|
815
|
+
* Parse the project from ProjectLocationCollectionDataStore resource.
|
816
|
+
*
|
817
|
+
* @param {string} projectLocationCollectionDataStoreName
|
818
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
819
|
+
* @returns {string} A string representing the project.
|
820
|
+
*/
|
821
|
+
matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
822
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
|
823
|
+
}
|
824
|
+
/**
|
825
|
+
* Parse the location from ProjectLocationCollectionDataStore resource.
|
826
|
+
*
|
827
|
+
* @param {string} projectLocationCollectionDataStoreName
|
828
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
829
|
+
* @returns {string} A string representing the location.
|
830
|
+
*/
|
831
|
+
matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
832
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
|
833
|
+
}
|
834
|
+
/**
|
835
|
+
* Parse the collection from ProjectLocationCollectionDataStore resource.
|
836
|
+
*
|
837
|
+
* @param {string} projectLocationCollectionDataStoreName
|
838
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
839
|
+
* @returns {string} A string representing the collection.
|
840
|
+
*/
|
841
|
+
matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
842
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
|
843
|
+
}
|
844
|
+
/**
|
845
|
+
* Parse the data_store from ProjectLocationCollectionDataStore resource.
|
846
|
+
*
|
847
|
+
* @param {string} projectLocationCollectionDataStoreName
|
848
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
849
|
+
* @returns {string} A string representing the data_store.
|
850
|
+
*/
|
851
|
+
matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
852
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
|
853
|
+
}
|
691
854
|
/**
|
692
855
|
* Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string.
|
693
856
|
*
|
@@ -1114,6 +1277,51 @@ class SearchServiceClient {
|
|
1114
1277
|
matchServingConfigFromProjectLocationCollectionEngineServingConfigName(projectLocationCollectionEngineServingConfigName) {
|
1115
1278
|
return this.pathTemplates.projectLocationCollectionEngineServingConfigPathTemplate.match(projectLocationCollectionEngineServingConfigName).serving_config;
|
1116
1279
|
}
|
1280
|
+
/**
|
1281
|
+
* Return a fully-qualified projectLocationDataStore resource name string.
|
1282
|
+
*
|
1283
|
+
* @param {string} project
|
1284
|
+
* @param {string} location
|
1285
|
+
* @param {string} data_store
|
1286
|
+
* @returns {string} Resource name string.
|
1287
|
+
*/
|
1288
|
+
projectLocationDataStorePath(project, location, dataStore) {
|
1289
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.render({
|
1290
|
+
project: project,
|
1291
|
+
location: location,
|
1292
|
+
data_store: dataStore,
|
1293
|
+
});
|
1294
|
+
}
|
1295
|
+
/**
|
1296
|
+
* Parse the project from ProjectLocationDataStore resource.
|
1297
|
+
*
|
1298
|
+
* @param {string} projectLocationDataStoreName
|
1299
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1300
|
+
* @returns {string} A string representing the project.
|
1301
|
+
*/
|
1302
|
+
matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
1303
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
|
1304
|
+
}
|
1305
|
+
/**
|
1306
|
+
* Parse the location from ProjectLocationDataStore resource.
|
1307
|
+
*
|
1308
|
+
* @param {string} projectLocationDataStoreName
|
1309
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1310
|
+
* @returns {string} A string representing the location.
|
1311
|
+
*/
|
1312
|
+
matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
1313
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
|
1314
|
+
}
|
1315
|
+
/**
|
1316
|
+
* Parse the data_store from ProjectLocationDataStore resource.
|
1317
|
+
*
|
1318
|
+
* @param {string} projectLocationDataStoreName
|
1319
|
+
* A fully-qualified path representing project_location_data_store resource.
|
1320
|
+
* @returns {string} A string representing the data_store.
|
1321
|
+
*/
|
1322
|
+
matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
1323
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
|
1324
|
+
}
|
1117
1325
|
/**
|
1118
1326
|
* Return a fully-qualified projectLocationDataStoreBranch resource name string.
|
1119
1327
|
*
|