@google-cloud/discoveryengine 2.5.2 → 2.5.3

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 (74) hide show
  1. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +30 -1
  2. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +459 -134
  3. package/build/protos/protos.d.ts +1400 -103
  4. package/build/protos/protos.js +3602 -201
  5. package/build/protos/protos.json +331 -35
  6. package/build/src/v1/assistant_service_client.js +1 -1
  7. package/build/src/v1/cmek_config_service_client.js +1 -1
  8. package/build/src/v1/completion_service_client.js +1 -1
  9. package/build/src/v1/control_service_client.js +1 -1
  10. package/build/src/v1/conversational_search_service_client.js +1 -1
  11. package/build/src/v1/data_store_service_client.js +1 -1
  12. package/build/src/v1/document_service_client.js +1 -1
  13. package/build/src/v1/engine_service_client.js +1 -1
  14. package/build/src/v1/grounded_generation_service_client.js +1 -1
  15. package/build/src/v1/identity_mapping_store_service_client.js +1 -1
  16. package/build/src/v1/index.js +1 -1
  17. package/build/src/v1/project_service_client.js +1 -1
  18. package/build/src/v1/rank_service_client.js +1 -1
  19. package/build/src/v1/recommendation_service_client.js +1 -1
  20. package/build/src/v1/schema_service_client.js +1 -1
  21. package/build/src/v1/search_service_client.d.ts +672 -432
  22. package/build/src/v1/search_service_client.js +449 -289
  23. package/build/src/v1/search_tuning_service_client.js +1 -1
  24. package/build/src/v1/serving_config_service_client.js +1 -1
  25. package/build/src/v1/session_service_client.js +1 -1
  26. package/build/src/v1/site_search_engine_service_client.js +1 -1
  27. package/build/src/v1/user_event_service_client.js +1 -1
  28. package/build/src/v1/user_license_service_client.js +1 -1
  29. package/build/src/v1alpha/acl_config_service_client.js +1 -1
  30. package/build/src/v1alpha/chunk_service_client.js +1 -1
  31. package/build/src/v1alpha/completion_service_client.js +1 -1
  32. package/build/src/v1alpha/control_service_client.js +1 -1
  33. package/build/src/v1alpha/conversational_search_service_client.js +1 -1
  34. package/build/src/v1alpha/data_store_service_client.js +1 -1
  35. package/build/src/v1alpha/document_service_client.js +1 -1
  36. package/build/src/v1alpha/engine_service_client.js +1 -1
  37. package/build/src/v1alpha/estimate_billing_service_client.js +1 -1
  38. package/build/src/v1alpha/evaluation_service_client.js +1 -1
  39. package/build/src/v1alpha/grounded_generation_service_client.js +1 -1
  40. package/build/src/v1alpha/index.js +1 -1
  41. package/build/src/v1alpha/project_service_client.js +1 -1
  42. package/build/src/v1alpha/rank_service_client.js +1 -1
  43. package/build/src/v1alpha/recommendation_service_client.js +1 -1
  44. package/build/src/v1alpha/sample_query_service_client.js +1 -1
  45. package/build/src/v1alpha/sample_query_set_service_client.js +1 -1
  46. package/build/src/v1alpha/schema_service_client.js +1 -1
  47. package/build/src/v1alpha/search_service_client.js +1 -1
  48. package/build/src/v1alpha/search_tuning_service_client.js +1 -1
  49. package/build/src/v1alpha/serving_config_service_client.js +1 -1
  50. package/build/src/v1alpha/session_service_client.js +1 -1
  51. package/build/src/v1alpha/site_search_engine_service_client.js +1 -1
  52. package/build/src/v1alpha/user_event_service_client.js +1 -1
  53. package/build/src/v1beta/completion_service_client.js +1 -1
  54. package/build/src/v1beta/control_service_client.js +1 -1
  55. package/build/src/v1beta/conversational_search_service_client.js +1 -1
  56. package/build/src/v1beta/data_store_service_client.js +1 -1
  57. package/build/src/v1beta/document_service_client.js +1 -1
  58. package/build/src/v1beta/engine_service_client.js +1 -1
  59. package/build/src/v1beta/evaluation_service_client.js +1 -1
  60. package/build/src/v1beta/grounded_generation_service_client.js +1 -1
  61. package/build/src/v1beta/index.js +1 -1
  62. package/build/src/v1beta/project_service_client.js +1 -1
  63. package/build/src/v1beta/rank_service_client.js +1 -1
  64. package/build/src/v1beta/recommendation_service_client.js +1 -1
  65. package/build/src/v1beta/sample_query_service_client.js +1 -1
  66. package/build/src/v1beta/sample_query_set_service_client.js +1 -1
  67. package/build/src/v1beta/schema_service_client.js +1 -1
  68. package/build/src/v1beta/search_service_client.js +1 -1
  69. package/build/src/v1beta/search_tuning_service_client.js +1 -1
  70. package/build/src/v1beta/serving_config_service_client.js +1 -1
  71. package/build/src/v1beta/session_service_client.js +1 -1
  72. package/build/src/v1beta/site_search_engine_service_client.js +1 -1
  73. package/build/src/v1beta/user_event_service_client.js +1 -1
  74. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2025 Google LLC
2
+ // Copyright 2026 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -373,6 +373,24 @@ class SearchServiceClient {
373
373
  * documents under the default branch.
374
374
  * @param {string} request.query
375
375
  * Raw search query.
376
+ * @param {string[]} [request.pageCategories]
377
+ * Optional. The categories associated with a category page. Must be set for
378
+ * category navigation queries to achieve good search quality. The format
379
+ * should be the same as
380
+ * {@link protos.google.cloud.discoveryengine.v1.PageInfo.page_category|PageInfo.page_category}.
381
+ * This field is the equivalent of the query for browse (navigation) queries.
382
+ * It's used by the browse model when the query is empty.
383
+ *
384
+ * If the field is empty, it will not be used by the browse model.
385
+ * If the field contains more than one element, only the first element will
386
+ * be used.
387
+ *
388
+ * To represent full path of a category, use '>' character to separate
389
+ * different hierarchies. If '>' is part of the category name, replace it with
390
+ * other character(s).
391
+ * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
392
+ * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
393
+ * > Founders Edition`
376
394
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
377
395
  * Raw image query.
378
396
  * @param {number} request.pageSize
@@ -403,6 +421,8 @@ class SearchServiceClient {
403
421
  * unset.
404
422
  *
405
423
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
424
+ *
425
+ * A large offset may be capped to a reasonable threshold.
406
426
  * @param {number} request.oneBoxPageSize
407
427
  * The maximum number of results to return for OneBox.
408
428
  * This applies to each OneBox type individually.
@@ -499,11 +519,11 @@ class SearchServiceClient {
499
519
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
500
520
  * The spell correction specification that specifies the mode under
501
521
  * which spell correction takes effect.
502
- * @param {string} request.userPseudoId
503
- * A unique identifier for tracking visitors. For example, this could be
504
- * implemented with an HTTP cookie, which should be able to uniquely identify
505
- * a visitor on a single device. This unique identifier should not change if
506
- * the visitor logs in or out of the website.
522
+ * @param {string} [request.userPseudoId]
523
+ * Optional. A unique identifier for tracking visitors. For example, this
524
+ * could be implemented with an HTTP cookie, which should be able to uniquely
525
+ * identify a visitor on a single device. This unique identifier should not
526
+ * change if the visitor logs in or out of the website.
507
527
  *
508
528
  * This field should NOT have a fixed value such as `unknown_visitor`.
509
529
  *
@@ -516,72 +536,9 @@ class SearchServiceClient {
516
536
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
517
537
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
518
538
  * A specification for configuring the behavior of content search.
519
- * @param {boolean} request.safeSearch
520
- * Whether to turn on safe search. This is only supported for
521
- * website search.
522
- * @param {number[]} request.userLabels
523
- * The user labels applied to a resource must meet the following requirements:
524
- *
525
- * * Each resource can have multiple labels, up to a maximum of 64.
526
- * * Each label must be a key-value pair.
527
- * * Keys have a minimum length of 1 character and a maximum length of 63
528
- * characters and cannot be empty. Values can be empty and have a maximum
529
- * length of 63 characters.
530
- * * Keys and values can contain only lowercase letters, numeric characters,
531
- * underscores, and dashes. All characters must use UTF-8 encoding, and
532
- * international characters are allowed.
533
- * * The key portion of a label must be unique. However, you can use the same
534
- * key with multiple resources.
535
- * * Keys must start with a lowercase letter or international character.
536
- *
537
- * See [Google Cloud
538
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
539
- * for more details.
540
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
541
- * Search as you type configuration. Only supported for the
542
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
543
- * vertical.
544
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
545
- * Optional. Config for display feature, like match highlighting on search
546
- * results.
547
- * @param {string} request.session
548
- * The session resource name. Optional.
549
- *
550
- * Session allows users to do multi-turn /search API calls or coordination
551
- * between /search API calls and /answer API calls.
552
- *
553
- * Example #1 (multi-turn /search API calls):
554
- * Call /search API with the session ID generated in the first call.
555
- * Here, the previous search query gets considered in query
556
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
557
- * and the current query is "How about 2023?", the current query will
558
- * be interpreted as "How did Alphabet do in 2023?".
559
- *
560
- * Example #2 (coordination between /search API calls and /answer API calls):
561
- * Call /answer API with the session ID generated in the first call.
562
- * Here, the answer generation happens in the context of the search
563
- * results from the first search call.
564
- *
565
- * Multi-turn Search feature is currently at private GA stage. Please use
566
- * v1alpha or v1beta version instead before we launch this feature to public
567
- * GA. Or ask for allowlisting through Google Support team.
568
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
569
- * Session specification.
570
- *
571
- * Can be used only when `session` is set.
572
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
573
- * The relevance threshold of the search results.
574
- *
575
- * Default to Google defined threshold, leveraging a balance of
576
- * precision and recall to deliver both highly accurate results and
577
- * comprehensive coverage of relevant information.
578
- *
579
- * This feature is not supported for healthcare search.
580
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
581
- * Optional. The specification for returning the relevance score.
582
- * @param {string} request.rankingExpression
583
- * The ranking expression controls the customized ranking on retrieval
584
- * documents. This overrides
539
+ * @param {string} [request.rankingExpression]
540
+ * Optional. The ranking expression controls the customized ranking on
541
+ * retrieval documents. This overrides
585
542
  * {@link protos.google.cloud.discoveryengine.v1.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
586
543
  * The syntax and supported features depend on the
587
544
  * `ranking_expression_backend` value. If `ranking_expression_backend` is not
@@ -671,7 +628,90 @@ class SearchServiceClient {
671
628
  * the document.
672
629
  * * `base_rank`: the default rank of the result
673
630
  * @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
674
- * The backend to use for the ranking expression evaluation.
631
+ * Optional. The backend to use for the ranking expression evaluation.
632
+ * @param {boolean} request.safeSearch
633
+ * Whether to turn on safe search. This is only supported for
634
+ * website search.
635
+ * @param {number[]} request.userLabels
636
+ * The user labels applied to a resource must meet the following requirements:
637
+ *
638
+ * * Each resource can have multiple labels, up to a maximum of 64.
639
+ * * Each label must be a key-value pair.
640
+ * * Keys have a minimum length of 1 character and a maximum length of 63
641
+ * characters and cannot be empty. Values can be empty and have a maximum
642
+ * length of 63 characters.
643
+ * * Keys and values can contain only lowercase letters, numeric characters,
644
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
645
+ * international characters are allowed.
646
+ * * The key portion of a label must be unique. However, you can use the same
647
+ * key with multiple resources.
648
+ * * Keys must start with a lowercase letter or international character.
649
+ *
650
+ * See [Google Cloud
651
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
652
+ * for more details.
653
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} [request.naturalLanguageQueryUnderstandingSpec]
654
+ * Optional. Config for natural language query understanding capabilities,
655
+ * such as extracting structured field filters from the query. Refer to [this
656
+ * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
657
+ * for more information.
658
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
659
+ * natural language query understanding will be done.
660
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
661
+ * Search as you type configuration. Only supported for the
662
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
663
+ * vertical.
664
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
665
+ * Optional. Config for display feature, like match highlighting on search
666
+ * results.
667
+ * @param {number[]} [request.crowdingSpecs]
668
+ * Optional. Crowding specifications for improving result diversity.
669
+ * If multiple CrowdingSpecs are specified, crowding will be evaluated on
670
+ * each unique combination of the `field` values, and max_count will be the
671
+ * maximum value of `max_count` across all CrowdingSpecs.
672
+ * For example, if the first CrowdingSpec has `field` = "color" and
673
+ * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
674
+ * `max_count` = 2, then after 3 documents that share the same color AND size
675
+ * have been returned, subsequent ones should be
676
+ * removed or demoted.
677
+ * @param {string} request.session
678
+ * The session resource name. Optional.
679
+ *
680
+ * Session allows users to do multi-turn /search API calls or coordination
681
+ * between /search API calls and /answer API calls.
682
+ *
683
+ * Example #1 (multi-turn /search API calls):
684
+ * Call /search API with the session ID generated in the first call.
685
+ * Here, the previous search query gets considered in query
686
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
687
+ * and the current query is "How about 2023?", the current query will
688
+ * be interpreted as "How did Alphabet do in 2023?".
689
+ *
690
+ * Example #2 (coordination between /search API calls and /answer API calls):
691
+ * Call /answer API with the session ID generated in the first call.
692
+ * Here, the answer generation happens in the context of the search
693
+ * results from the first search call.
694
+ *
695
+ * Multi-turn Search feature is currently at private GA stage. Please use
696
+ * v1alpha or v1beta version instead before we launch this feature to public
697
+ * GA. Or ask for allowlisting through Google Support team.
698
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
699
+ * Session specification.
700
+ *
701
+ * Can be used only when `session` is set.
702
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
703
+ * The global relevance threshold of the search results.
704
+ *
705
+ * Defaults to Google defined threshold, leveraging a balance of
706
+ * precision and recall to deliver both highly accurate results and
707
+ * comprehensive coverage of relevant information.
708
+ *
709
+ * If more granular relevance filtering is required, use the
710
+ * `relevance_filter_spec` instead.
711
+ *
712
+ * This feature is not supported for healthcare search.
713
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
714
+ * Optional. The specification for returning the relevance score.
675
715
  * @param {object} [options]
676
716
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
677
717
  * @returns {Stream}
@@ -718,6 +758,24 @@ class SearchServiceClient {
718
758
  * documents under the default branch.
719
759
  * @param {string} request.query
720
760
  * Raw search query.
761
+ * @param {string[]} [request.pageCategories]
762
+ * Optional. The categories associated with a category page. Must be set for
763
+ * category navigation queries to achieve good search quality. The format
764
+ * should be the same as
765
+ * {@link protos.google.cloud.discoveryengine.v1.PageInfo.page_category|PageInfo.page_category}.
766
+ * This field is the equivalent of the query for browse (navigation) queries.
767
+ * It's used by the browse model when the query is empty.
768
+ *
769
+ * If the field is empty, it will not be used by the browse model.
770
+ * If the field contains more than one element, only the first element will
771
+ * be used.
772
+ *
773
+ * To represent full path of a category, use '>' character to separate
774
+ * different hierarchies. If '>' is part of the category name, replace it with
775
+ * other character(s).
776
+ * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
777
+ * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
778
+ * > Founders Edition`
721
779
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
722
780
  * Raw image query.
723
781
  * @param {number} request.pageSize
@@ -748,6 +806,8 @@ class SearchServiceClient {
748
806
  * unset.
749
807
  *
750
808
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
809
+ *
810
+ * A large offset may be capped to a reasonable threshold.
751
811
  * @param {number} request.oneBoxPageSize
752
812
  * The maximum number of results to return for OneBox.
753
813
  * This applies to each OneBox type individually.
@@ -844,11 +904,11 @@ class SearchServiceClient {
844
904
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
845
905
  * The spell correction specification that specifies the mode under
846
906
  * which spell correction takes effect.
847
- * @param {string} request.userPseudoId
848
- * A unique identifier for tracking visitors. For example, this could be
849
- * implemented with an HTTP cookie, which should be able to uniquely identify
850
- * a visitor on a single device. This unique identifier should not change if
851
- * the visitor logs in or out of the website.
907
+ * @param {string} [request.userPseudoId]
908
+ * Optional. A unique identifier for tracking visitors. For example, this
909
+ * could be implemented with an HTTP cookie, which should be able to uniquely
910
+ * identify a visitor on a single device. This unique identifier should not
911
+ * change if the visitor logs in or out of the website.
852
912
  *
853
913
  * This field should NOT have a fixed value such as `unknown_visitor`.
854
914
  *
@@ -861,72 +921,9 @@ class SearchServiceClient {
861
921
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
862
922
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
863
923
  * A specification for configuring the behavior of content search.
864
- * @param {boolean} request.safeSearch
865
- * Whether to turn on safe search. This is only supported for
866
- * website search.
867
- * @param {number[]} request.userLabels
868
- * The user labels applied to a resource must meet the following requirements:
869
- *
870
- * * Each resource can have multiple labels, up to a maximum of 64.
871
- * * Each label must be a key-value pair.
872
- * * Keys have a minimum length of 1 character and a maximum length of 63
873
- * characters and cannot be empty. Values can be empty and have a maximum
874
- * length of 63 characters.
875
- * * Keys and values can contain only lowercase letters, numeric characters,
876
- * underscores, and dashes. All characters must use UTF-8 encoding, and
877
- * international characters are allowed.
878
- * * The key portion of a label must be unique. However, you can use the same
879
- * key with multiple resources.
880
- * * Keys must start with a lowercase letter or international character.
881
- *
882
- * See [Google Cloud
883
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
884
- * for more details.
885
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
886
- * Search as you type configuration. Only supported for the
887
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
888
- * vertical.
889
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
890
- * Optional. Config for display feature, like match highlighting on search
891
- * results.
892
- * @param {string} request.session
893
- * The session resource name. Optional.
894
- *
895
- * Session allows users to do multi-turn /search API calls or coordination
896
- * between /search API calls and /answer API calls.
897
- *
898
- * Example #1 (multi-turn /search API calls):
899
- * Call /search API with the session ID generated in the first call.
900
- * Here, the previous search query gets considered in query
901
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
902
- * and the current query is "How about 2023?", the current query will
903
- * be interpreted as "How did Alphabet do in 2023?".
904
- *
905
- * Example #2 (coordination between /search API calls and /answer API calls):
906
- * Call /answer API with the session ID generated in the first call.
907
- * Here, the answer generation happens in the context of the search
908
- * results from the first search call.
909
- *
910
- * Multi-turn Search feature is currently at private GA stage. Please use
911
- * v1alpha or v1beta version instead before we launch this feature to public
912
- * GA. Or ask for allowlisting through Google Support team.
913
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
914
- * Session specification.
915
- *
916
- * Can be used only when `session` is set.
917
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
918
- * The relevance threshold of the search results.
919
- *
920
- * Default to Google defined threshold, leveraging a balance of
921
- * precision and recall to deliver both highly accurate results and
922
- * comprehensive coverage of relevant information.
923
- *
924
- * This feature is not supported for healthcare search.
925
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
926
- * Optional. The specification for returning the relevance score.
927
- * @param {string} request.rankingExpression
928
- * The ranking expression controls the customized ranking on retrieval
929
- * documents. This overrides
924
+ * @param {string} [request.rankingExpression]
925
+ * Optional. The ranking expression controls the customized ranking on
926
+ * retrieval documents. This overrides
930
927
  * {@link protos.google.cloud.discoveryengine.v1.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
931
928
  * The syntax and supported features depend on the
932
929
  * `ranking_expression_backend` value. If `ranking_expression_backend` is not
@@ -1016,7 +1013,90 @@ class SearchServiceClient {
1016
1013
  * the document.
1017
1014
  * * `base_rank`: the default rank of the result
1018
1015
  * @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
1019
- * The backend to use for the ranking expression evaluation.
1016
+ * Optional. The backend to use for the ranking expression evaluation.
1017
+ * @param {boolean} request.safeSearch
1018
+ * Whether to turn on safe search. This is only supported for
1019
+ * website search.
1020
+ * @param {number[]} request.userLabels
1021
+ * The user labels applied to a resource must meet the following requirements:
1022
+ *
1023
+ * * Each resource can have multiple labels, up to a maximum of 64.
1024
+ * * Each label must be a key-value pair.
1025
+ * * Keys have a minimum length of 1 character and a maximum length of 63
1026
+ * characters and cannot be empty. Values can be empty and have a maximum
1027
+ * length of 63 characters.
1028
+ * * Keys and values can contain only lowercase letters, numeric characters,
1029
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
1030
+ * international characters are allowed.
1031
+ * * The key portion of a label must be unique. However, you can use the same
1032
+ * key with multiple resources.
1033
+ * * Keys must start with a lowercase letter or international character.
1034
+ *
1035
+ * See [Google Cloud
1036
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1037
+ * for more details.
1038
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} [request.naturalLanguageQueryUnderstandingSpec]
1039
+ * Optional. Config for natural language query understanding capabilities,
1040
+ * such as extracting structured field filters from the query. Refer to [this
1041
+ * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
1042
+ * for more information.
1043
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
1044
+ * natural language query understanding will be done.
1045
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1046
+ * Search as you type configuration. Only supported for the
1047
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1048
+ * vertical.
1049
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1050
+ * Optional. Config for display feature, like match highlighting on search
1051
+ * results.
1052
+ * @param {number[]} [request.crowdingSpecs]
1053
+ * Optional. Crowding specifications for improving result diversity.
1054
+ * If multiple CrowdingSpecs are specified, crowding will be evaluated on
1055
+ * each unique combination of the `field` values, and max_count will be the
1056
+ * maximum value of `max_count` across all CrowdingSpecs.
1057
+ * For example, if the first CrowdingSpec has `field` = "color" and
1058
+ * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
1059
+ * `max_count` = 2, then after 3 documents that share the same color AND size
1060
+ * have been returned, subsequent ones should be
1061
+ * removed or demoted.
1062
+ * @param {string} request.session
1063
+ * The session resource name. Optional.
1064
+ *
1065
+ * Session allows users to do multi-turn /search API calls or coordination
1066
+ * between /search API calls and /answer API calls.
1067
+ *
1068
+ * Example #1 (multi-turn /search API calls):
1069
+ * Call /search API with the session ID generated in the first call.
1070
+ * Here, the previous search query gets considered in query
1071
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1072
+ * and the current query is "How about 2023?", the current query will
1073
+ * be interpreted as "How did Alphabet do in 2023?".
1074
+ *
1075
+ * Example #2 (coordination between /search API calls and /answer API calls):
1076
+ * Call /answer API with the session ID generated in the first call.
1077
+ * Here, the answer generation happens in the context of the search
1078
+ * results from the first search call.
1079
+ *
1080
+ * Multi-turn Search feature is currently at private GA stage. Please use
1081
+ * v1alpha or v1beta version instead before we launch this feature to public
1082
+ * GA. Or ask for allowlisting through Google Support team.
1083
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1084
+ * Session specification.
1085
+ *
1086
+ * Can be used only when `session` is set.
1087
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1088
+ * The global relevance threshold of the search results.
1089
+ *
1090
+ * Defaults to Google defined threshold, leveraging a balance of
1091
+ * precision and recall to deliver both highly accurate results and
1092
+ * comprehensive coverage of relevant information.
1093
+ *
1094
+ * If more granular relevance filtering is required, use the
1095
+ * `relevance_filter_spec` instead.
1096
+ *
1097
+ * This feature is not supported for healthcare search.
1098
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1099
+ * Optional. The specification for returning the relevance score.
1020
1100
  * @param {object} [options]
1021
1101
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1022
1102
  * @returns {Object}
@@ -1093,6 +1173,24 @@ class SearchServiceClient {
1093
1173
  * documents under the default branch.
1094
1174
  * @param {string} request.query
1095
1175
  * Raw search query.
1176
+ * @param {string[]} [request.pageCategories]
1177
+ * Optional. The categories associated with a category page. Must be set for
1178
+ * category navigation queries to achieve good search quality. The format
1179
+ * should be the same as
1180
+ * {@link protos.google.cloud.discoveryengine.v1.PageInfo.page_category|PageInfo.page_category}.
1181
+ * This field is the equivalent of the query for browse (navigation) queries.
1182
+ * It's used by the browse model when the query is empty.
1183
+ *
1184
+ * If the field is empty, it will not be used by the browse model.
1185
+ * If the field contains more than one element, only the first element will
1186
+ * be used.
1187
+ *
1188
+ * To represent full path of a category, use '>' character to separate
1189
+ * different hierarchies. If '>' is part of the category name, replace it with
1190
+ * other character(s).
1191
+ * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
1192
+ * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
1193
+ * > Founders Edition`
1096
1194
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
1097
1195
  * Raw image query.
1098
1196
  * @param {number} request.pageSize
@@ -1123,6 +1221,8 @@ class SearchServiceClient {
1123
1221
  * unset.
1124
1222
  *
1125
1223
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
1224
+ *
1225
+ * A large offset may be capped to a reasonable threshold.
1126
1226
  * @param {number} request.oneBoxPageSize
1127
1227
  * The maximum number of results to return for OneBox.
1128
1228
  * This applies to each OneBox type individually.
@@ -1219,11 +1319,11 @@ class SearchServiceClient {
1219
1319
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
1220
1320
  * The spell correction specification that specifies the mode under
1221
1321
  * which spell correction takes effect.
1222
- * @param {string} request.userPseudoId
1223
- * A unique identifier for tracking visitors. For example, this could be
1224
- * implemented with an HTTP cookie, which should be able to uniquely identify
1225
- * a visitor on a single device. This unique identifier should not change if
1226
- * the visitor logs in or out of the website.
1322
+ * @param {string} [request.userPseudoId]
1323
+ * Optional. A unique identifier for tracking visitors. For example, this
1324
+ * could be implemented with an HTTP cookie, which should be able to uniquely
1325
+ * identify a visitor on a single device. This unique identifier should not
1326
+ * change if the visitor logs in or out of the website.
1227
1327
  *
1228
1328
  * This field should NOT have a fixed value such as `unknown_visitor`.
1229
1329
  *
@@ -1236,72 +1336,9 @@ class SearchServiceClient {
1236
1336
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
1237
1337
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
1238
1338
  * A specification for configuring the behavior of content search.
1239
- * @param {boolean} request.safeSearch
1240
- * Whether to turn on safe search. This is only supported for
1241
- * website search.
1242
- * @param {number[]} request.userLabels
1243
- * The user labels applied to a resource must meet the following requirements:
1244
- *
1245
- * * Each resource can have multiple labels, up to a maximum of 64.
1246
- * * Each label must be a key-value pair.
1247
- * * Keys have a minimum length of 1 character and a maximum length of 63
1248
- * characters and cannot be empty. Values can be empty and have a maximum
1249
- * length of 63 characters.
1250
- * * Keys and values can contain only lowercase letters, numeric characters,
1251
- * underscores, and dashes. All characters must use UTF-8 encoding, and
1252
- * international characters are allowed.
1253
- * * The key portion of a label must be unique. However, you can use the same
1254
- * key with multiple resources.
1255
- * * Keys must start with a lowercase letter or international character.
1256
- *
1257
- * See [Google Cloud
1258
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1259
- * for more details.
1260
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1261
- * Search as you type configuration. Only supported for the
1262
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1263
- * vertical.
1264
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1265
- * Optional. Config for display feature, like match highlighting on search
1266
- * results.
1267
- * @param {string} request.session
1268
- * The session resource name. Optional.
1269
- *
1270
- * Session allows users to do multi-turn /search API calls or coordination
1271
- * between /search API calls and /answer API calls.
1272
- *
1273
- * Example #1 (multi-turn /search API calls):
1274
- * Call /search API with the session ID generated in the first call.
1275
- * Here, the previous search query gets considered in query
1276
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1277
- * and the current query is "How about 2023?", the current query will
1278
- * be interpreted as "How did Alphabet do in 2023?".
1279
- *
1280
- * Example #2 (coordination between /search API calls and /answer API calls):
1281
- * Call /answer API with the session ID generated in the first call.
1282
- * Here, the answer generation happens in the context of the search
1283
- * results from the first search call.
1284
- *
1285
- * Multi-turn Search feature is currently at private GA stage. Please use
1286
- * v1alpha or v1beta version instead before we launch this feature to public
1287
- * GA. Or ask for allowlisting through Google Support team.
1288
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1289
- * Session specification.
1290
- *
1291
- * Can be used only when `session` is set.
1292
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1293
- * The relevance threshold of the search results.
1294
- *
1295
- * Default to Google defined threshold, leveraging a balance of
1296
- * precision and recall to deliver both highly accurate results and
1297
- * comprehensive coverage of relevant information.
1298
- *
1299
- * This feature is not supported for healthcare search.
1300
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1301
- * Optional. The specification for returning the relevance score.
1302
- * @param {string} request.rankingExpression
1303
- * The ranking expression controls the customized ranking on retrieval
1304
- * documents. This overrides
1339
+ * @param {string} [request.rankingExpression]
1340
+ * Optional. The ranking expression controls the customized ranking on
1341
+ * retrieval documents. This overrides
1305
1342
  * {@link protos.google.cloud.discoveryengine.v1.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
1306
1343
  * The syntax and supported features depend on the
1307
1344
  * `ranking_expression_backend` value. If `ranking_expression_backend` is not
@@ -1391,7 +1428,90 @@ class SearchServiceClient {
1391
1428
  * the document.
1392
1429
  * * `base_rank`: the default rank of the result
1393
1430
  * @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
1394
- * The backend to use for the ranking expression evaluation.
1431
+ * Optional. The backend to use for the ranking expression evaluation.
1432
+ * @param {boolean} request.safeSearch
1433
+ * Whether to turn on safe search. This is only supported for
1434
+ * website search.
1435
+ * @param {number[]} request.userLabels
1436
+ * The user labels applied to a resource must meet the following requirements:
1437
+ *
1438
+ * * Each resource can have multiple labels, up to a maximum of 64.
1439
+ * * Each label must be a key-value pair.
1440
+ * * Keys have a minimum length of 1 character and a maximum length of 63
1441
+ * characters and cannot be empty. Values can be empty and have a maximum
1442
+ * length of 63 characters.
1443
+ * * Keys and values can contain only lowercase letters, numeric characters,
1444
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
1445
+ * international characters are allowed.
1446
+ * * The key portion of a label must be unique. However, you can use the same
1447
+ * key with multiple resources.
1448
+ * * Keys must start with a lowercase letter or international character.
1449
+ *
1450
+ * See [Google Cloud
1451
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1452
+ * for more details.
1453
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} [request.naturalLanguageQueryUnderstandingSpec]
1454
+ * Optional. Config for natural language query understanding capabilities,
1455
+ * such as extracting structured field filters from the query. Refer to [this
1456
+ * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
1457
+ * for more information.
1458
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
1459
+ * natural language query understanding will be done.
1460
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1461
+ * Search as you type configuration. Only supported for the
1462
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1463
+ * vertical.
1464
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1465
+ * Optional. Config for display feature, like match highlighting on search
1466
+ * results.
1467
+ * @param {number[]} [request.crowdingSpecs]
1468
+ * Optional. Crowding specifications for improving result diversity.
1469
+ * If multiple CrowdingSpecs are specified, crowding will be evaluated on
1470
+ * each unique combination of the `field` values, and max_count will be the
1471
+ * maximum value of `max_count` across all CrowdingSpecs.
1472
+ * For example, if the first CrowdingSpec has `field` = "color" and
1473
+ * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
1474
+ * `max_count` = 2, then after 3 documents that share the same color AND size
1475
+ * have been returned, subsequent ones should be
1476
+ * removed or demoted.
1477
+ * @param {string} request.session
1478
+ * The session resource name. Optional.
1479
+ *
1480
+ * Session allows users to do multi-turn /search API calls or coordination
1481
+ * between /search API calls and /answer API calls.
1482
+ *
1483
+ * Example #1 (multi-turn /search API calls):
1484
+ * Call /search API with the session ID generated in the first call.
1485
+ * Here, the previous search query gets considered in query
1486
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1487
+ * and the current query is "How about 2023?", the current query will
1488
+ * be interpreted as "How did Alphabet do in 2023?".
1489
+ *
1490
+ * Example #2 (coordination between /search API calls and /answer API calls):
1491
+ * Call /answer API with the session ID generated in the first call.
1492
+ * Here, the answer generation happens in the context of the search
1493
+ * results from the first search call.
1494
+ *
1495
+ * Multi-turn Search feature is currently at private GA stage. Please use
1496
+ * v1alpha or v1beta version instead before we launch this feature to public
1497
+ * GA. Or ask for allowlisting through Google Support team.
1498
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1499
+ * Session specification.
1500
+ *
1501
+ * Can be used only when `session` is set.
1502
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1503
+ * The global relevance threshold of the search results.
1504
+ *
1505
+ * Defaults to Google defined threshold, leveraging a balance of
1506
+ * precision and recall to deliver both highly accurate results and
1507
+ * comprehensive coverage of relevant information.
1508
+ *
1509
+ * If more granular relevance filtering is required, use the
1510
+ * `relevance_filter_spec` instead.
1511
+ *
1512
+ * This feature is not supported for healthcare search.
1513
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1514
+ * Optional. The specification for returning the relevance score.
1395
1515
  * @param {object} [options]
1396
1516
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1397
1517
  * @returns {Stream}
@@ -1438,6 +1558,24 @@ class SearchServiceClient {
1438
1558
  * documents under the default branch.
1439
1559
  * @param {string} request.query
1440
1560
  * Raw search query.
1561
+ * @param {string[]} [request.pageCategories]
1562
+ * Optional. The categories associated with a category page. Must be set for
1563
+ * category navigation queries to achieve good search quality. The format
1564
+ * should be the same as
1565
+ * {@link protos.google.cloud.discoveryengine.v1.PageInfo.page_category|PageInfo.page_category}.
1566
+ * This field is the equivalent of the query for browse (navigation) queries.
1567
+ * It's used by the browse model when the query is empty.
1568
+ *
1569
+ * If the field is empty, it will not be used by the browse model.
1570
+ * If the field contains more than one element, only the first element will
1571
+ * be used.
1572
+ *
1573
+ * To represent full path of a category, use '>' character to separate
1574
+ * different hierarchies. If '>' is part of the category name, replace it with
1575
+ * other character(s).
1576
+ * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
1577
+ * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
1578
+ * > Founders Edition`
1441
1579
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
1442
1580
  * Raw image query.
1443
1581
  * @param {number} request.pageSize
@@ -1468,6 +1606,8 @@ class SearchServiceClient {
1468
1606
  * unset.
1469
1607
  *
1470
1608
  * If this field is negative, an `INVALID_ARGUMENT` is returned.
1609
+ *
1610
+ * A large offset may be capped to a reasonable threshold.
1471
1611
  * @param {number} request.oneBoxPageSize
1472
1612
  * The maximum number of results to return for OneBox.
1473
1613
  * This applies to each OneBox type individually.
@@ -1564,11 +1704,11 @@ class SearchServiceClient {
1564
1704
  * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
1565
1705
  * The spell correction specification that specifies the mode under
1566
1706
  * which spell correction takes effect.
1567
- * @param {string} request.userPseudoId
1568
- * A unique identifier for tracking visitors. For example, this could be
1569
- * implemented with an HTTP cookie, which should be able to uniquely identify
1570
- * a visitor on a single device. This unique identifier should not change if
1571
- * the visitor logs in or out of the website.
1707
+ * @param {string} [request.userPseudoId]
1708
+ * Optional. A unique identifier for tracking visitors. For example, this
1709
+ * could be implemented with an HTTP cookie, which should be able to uniquely
1710
+ * identify a visitor on a single device. This unique identifier should not
1711
+ * change if the visitor logs in or out of the website.
1572
1712
  *
1573
1713
  * This field should NOT have a fixed value such as `unknown_visitor`.
1574
1714
  *
@@ -1581,72 +1721,9 @@ class SearchServiceClient {
1581
1721
  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
1582
1722
  * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
1583
1723
  * A specification for configuring the behavior of content search.
1584
- * @param {boolean} request.safeSearch
1585
- * Whether to turn on safe search. This is only supported for
1586
- * website search.
1587
- * @param {number[]} request.userLabels
1588
- * The user labels applied to a resource must meet the following requirements:
1589
- *
1590
- * * Each resource can have multiple labels, up to a maximum of 64.
1591
- * * Each label must be a key-value pair.
1592
- * * Keys have a minimum length of 1 character and a maximum length of 63
1593
- * characters and cannot be empty. Values can be empty and have a maximum
1594
- * length of 63 characters.
1595
- * * Keys and values can contain only lowercase letters, numeric characters,
1596
- * underscores, and dashes. All characters must use UTF-8 encoding, and
1597
- * international characters are allowed.
1598
- * * The key portion of a label must be unique. However, you can use the same
1599
- * key with multiple resources.
1600
- * * Keys must start with a lowercase letter or international character.
1601
- *
1602
- * See [Google Cloud
1603
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1604
- * for more details.
1605
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1606
- * Search as you type configuration. Only supported for the
1607
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1608
- * vertical.
1609
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1610
- * Optional. Config for display feature, like match highlighting on search
1611
- * results.
1612
- * @param {string} request.session
1613
- * The session resource name. Optional.
1614
- *
1615
- * Session allows users to do multi-turn /search API calls or coordination
1616
- * between /search API calls and /answer API calls.
1617
- *
1618
- * Example #1 (multi-turn /search API calls):
1619
- * Call /search API with the session ID generated in the first call.
1620
- * Here, the previous search query gets considered in query
1621
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1622
- * and the current query is "How about 2023?", the current query will
1623
- * be interpreted as "How did Alphabet do in 2023?".
1624
- *
1625
- * Example #2 (coordination between /search API calls and /answer API calls):
1626
- * Call /answer API with the session ID generated in the first call.
1627
- * Here, the answer generation happens in the context of the search
1628
- * results from the first search call.
1629
- *
1630
- * Multi-turn Search feature is currently at private GA stage. Please use
1631
- * v1alpha or v1beta version instead before we launch this feature to public
1632
- * GA. Or ask for allowlisting through Google Support team.
1633
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1634
- * Session specification.
1635
- *
1636
- * Can be used only when `session` is set.
1637
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1638
- * The relevance threshold of the search results.
1639
- *
1640
- * Default to Google defined threshold, leveraging a balance of
1641
- * precision and recall to deliver both highly accurate results and
1642
- * comprehensive coverage of relevant information.
1643
- *
1644
- * This feature is not supported for healthcare search.
1645
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1646
- * Optional. The specification for returning the relevance score.
1647
- * @param {string} request.rankingExpression
1648
- * The ranking expression controls the customized ranking on retrieval
1649
- * documents. This overrides
1724
+ * @param {string} [request.rankingExpression]
1725
+ * Optional. The ranking expression controls the customized ranking on
1726
+ * retrieval documents. This overrides
1650
1727
  * {@link protos.google.cloud.discoveryengine.v1.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
1651
1728
  * The syntax and supported features depend on the
1652
1729
  * `ranking_expression_backend` value. If `ranking_expression_backend` is not
@@ -1736,7 +1813,90 @@ class SearchServiceClient {
1736
1813
  * the document.
1737
1814
  * * `base_rank`: the default rank of the result
1738
1815
  * @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
1739
- * The backend to use for the ranking expression evaluation.
1816
+ * Optional. The backend to use for the ranking expression evaluation.
1817
+ * @param {boolean} request.safeSearch
1818
+ * Whether to turn on safe search. This is only supported for
1819
+ * website search.
1820
+ * @param {number[]} request.userLabels
1821
+ * The user labels applied to a resource must meet the following requirements:
1822
+ *
1823
+ * * Each resource can have multiple labels, up to a maximum of 64.
1824
+ * * Each label must be a key-value pair.
1825
+ * * Keys have a minimum length of 1 character and a maximum length of 63
1826
+ * characters and cannot be empty. Values can be empty and have a maximum
1827
+ * length of 63 characters.
1828
+ * * Keys and values can contain only lowercase letters, numeric characters,
1829
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
1830
+ * international characters are allowed.
1831
+ * * The key portion of a label must be unique. However, you can use the same
1832
+ * key with multiple resources.
1833
+ * * Keys must start with a lowercase letter or international character.
1834
+ *
1835
+ * See [Google Cloud
1836
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1837
+ * for more details.
1838
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.NaturalLanguageQueryUnderstandingSpec} [request.naturalLanguageQueryUnderstandingSpec]
1839
+ * Optional. Config for natural language query understanding capabilities,
1840
+ * such as extracting structured field filters from the query. Refer to [this
1841
+ * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
1842
+ * for more information.
1843
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
1844
+ * natural language query understanding will be done.
1845
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1846
+ * Search as you type configuration. Only supported for the
1847
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1848
+ * vertical.
1849
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1850
+ * Optional. Config for display feature, like match highlighting on search
1851
+ * results.
1852
+ * @param {number[]} [request.crowdingSpecs]
1853
+ * Optional. Crowding specifications for improving result diversity.
1854
+ * If multiple CrowdingSpecs are specified, crowding will be evaluated on
1855
+ * each unique combination of the `field` values, and max_count will be the
1856
+ * maximum value of `max_count` across all CrowdingSpecs.
1857
+ * For example, if the first CrowdingSpec has `field` = "color" and
1858
+ * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
1859
+ * `max_count` = 2, then after 3 documents that share the same color AND size
1860
+ * have been returned, subsequent ones should be
1861
+ * removed or demoted.
1862
+ * @param {string} request.session
1863
+ * The session resource name. Optional.
1864
+ *
1865
+ * Session allows users to do multi-turn /search API calls or coordination
1866
+ * between /search API calls and /answer API calls.
1867
+ *
1868
+ * Example #1 (multi-turn /search API calls):
1869
+ * Call /search API with the session ID generated in the first call.
1870
+ * Here, the previous search query gets considered in query
1871
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1872
+ * and the current query is "How about 2023?", the current query will
1873
+ * be interpreted as "How did Alphabet do in 2023?".
1874
+ *
1875
+ * Example #2 (coordination between /search API calls and /answer API calls):
1876
+ * Call /answer API with the session ID generated in the first call.
1877
+ * Here, the answer generation happens in the context of the search
1878
+ * results from the first search call.
1879
+ *
1880
+ * Multi-turn Search feature is currently at private GA stage. Please use
1881
+ * v1alpha or v1beta version instead before we launch this feature to public
1882
+ * GA. Or ask for allowlisting through Google Support team.
1883
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1884
+ * Session specification.
1885
+ *
1886
+ * Can be used only when `session` is set.
1887
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1888
+ * The global relevance threshold of the search results.
1889
+ *
1890
+ * Defaults to Google defined threshold, leveraging a balance of
1891
+ * precision and recall to deliver both highly accurate results and
1892
+ * comprehensive coverage of relevant information.
1893
+ *
1894
+ * If more granular relevance filtering is required, use the
1895
+ * `relevance_filter_spec` instead.
1896
+ *
1897
+ * This feature is not supported for healthcare search.
1898
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1899
+ * Optional. The specification for returning the relevance score.
1740
1900
  * @param {object} [options]
1741
1901
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1742
1902
  * @returns {Object}