google-cloud-discovery_engine-v1 2.6.2 → 2.7.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +222 -142
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +222 -142
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +17 -2
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +30 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +463 -113
- metadata +1 -1
|
@@ -210,7 +210,7 @@ module Google
|
|
|
210
210
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
211
211
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
212
212
|
#
|
|
213
|
-
# @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil,
|
|
213
|
+
# @overload search(serving_config: nil, branch: nil, query: nil, page_categories: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil)
|
|
214
214
|
# Pass arguments to `search` via keyword arguments. Note that at
|
|
215
215
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
216
216
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -230,6 +230,24 @@ module Google
|
|
|
230
230
|
# documents under the default branch.
|
|
231
231
|
# @param query [::String]
|
|
232
232
|
# Raw search query.
|
|
233
|
+
# @param page_categories [::Array<::String>]
|
|
234
|
+
# Optional. The categories associated with a category page. Must be set for
|
|
235
|
+
# category navigation queries to achieve good search quality. The format
|
|
236
|
+
# should be the same as
|
|
237
|
+
# {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}.
|
|
238
|
+
# This field is the equivalent of the query for browse (navigation) queries.
|
|
239
|
+
# It's used by the browse model when the query is empty.
|
|
240
|
+
#
|
|
241
|
+
# If the field is empty, it will not be used by the browse model.
|
|
242
|
+
# If the field contains more than one element, only the first element will
|
|
243
|
+
# be used.
|
|
244
|
+
#
|
|
245
|
+
# To represent full path of a category, use '>' character to separate
|
|
246
|
+
# different hierarchies. If '>' is part of the category name, replace it with
|
|
247
|
+
# other character(s).
|
|
248
|
+
# For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
|
|
249
|
+
# 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
|
|
250
|
+
# > Founders Edition`
|
|
233
251
|
# @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash]
|
|
234
252
|
# Raw image query.
|
|
235
253
|
# @param page_size [::Integer]
|
|
@@ -260,6 +278,8 @@ module Google
|
|
|
260
278
|
# unset.
|
|
261
279
|
#
|
|
262
280
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
|
281
|
+
#
|
|
282
|
+
# A large offset may be capped to a reasonable threshold.
|
|
263
283
|
# @param one_box_page_size [::Integer]
|
|
264
284
|
# The maximum number of results to return for OneBox.
|
|
265
285
|
# This applies to each OneBox type individually.
|
|
@@ -357,10 +377,10 @@ module Google
|
|
|
357
377
|
# The spell correction specification that specifies the mode under
|
|
358
378
|
# which spell correction takes effect.
|
|
359
379
|
# @param user_pseudo_id [::String]
|
|
360
|
-
# A unique identifier for tracking visitors. For example, this
|
|
361
|
-
# implemented with an HTTP cookie, which should be able to uniquely
|
|
362
|
-
# a visitor on a single device. This unique identifier should not
|
|
363
|
-
# the visitor logs in or out of the website.
|
|
380
|
+
# Optional. A unique identifier for tracking visitors. For example, this
|
|
381
|
+
# could be implemented with an HTTP cookie, which should be able to uniquely
|
|
382
|
+
# identify a visitor on a single device. This unique identifier should not
|
|
383
|
+
# change if the visitor logs in or out of the website.
|
|
364
384
|
#
|
|
365
385
|
# This field should NOT have a fixed value such as `unknown_visitor`.
|
|
366
386
|
#
|
|
@@ -373,72 +393,9 @@ module Google
|
|
|
373
393
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
374
394
|
# @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash]
|
|
375
395
|
# A specification for configuring the behavior of content search.
|
|
376
|
-
# @param safe_search [::Boolean]
|
|
377
|
-
# Whether to turn on safe search. This is only supported for
|
|
378
|
-
# website search.
|
|
379
|
-
# @param user_labels [::Hash{::String => ::String}]
|
|
380
|
-
# The user labels applied to a resource must meet the following requirements:
|
|
381
|
-
#
|
|
382
|
-
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
383
|
-
# * Each label must be a key-value pair.
|
|
384
|
-
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
385
|
-
# characters and cannot be empty. Values can be empty and have a maximum
|
|
386
|
-
# length of 63 characters.
|
|
387
|
-
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
388
|
-
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
389
|
-
# international characters are allowed.
|
|
390
|
-
# * The key portion of a label must be unique. However, you can use the same
|
|
391
|
-
# key with multiple resources.
|
|
392
|
-
# * Keys must start with a lowercase letter or international character.
|
|
393
|
-
#
|
|
394
|
-
# See [Google Cloud
|
|
395
|
-
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
396
|
-
# for more details.
|
|
397
|
-
# @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash]
|
|
398
|
-
# Search as you type configuration. Only supported for the
|
|
399
|
-
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
|
400
|
-
# vertical.
|
|
401
|
-
# @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash]
|
|
402
|
-
# Optional. Config for display feature, like match highlighting on search
|
|
403
|
-
# results.
|
|
404
|
-
# @param session [::String]
|
|
405
|
-
# The session resource name. Optional.
|
|
406
|
-
#
|
|
407
|
-
# Session allows users to do multi-turn /search API calls or coordination
|
|
408
|
-
# between /search API calls and /answer API calls.
|
|
409
|
-
#
|
|
410
|
-
# Example #1 (multi-turn /search API calls):
|
|
411
|
-
# Call /search API with the session ID generated in the first call.
|
|
412
|
-
# Here, the previous search query gets considered in query
|
|
413
|
-
# standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
|
414
|
-
# and the current query is "How about 2023?", the current query will
|
|
415
|
-
# be interpreted as "How did Alphabet do in 2023?".
|
|
416
|
-
#
|
|
417
|
-
# Example #2 (coordination between /search API calls and /answer API calls):
|
|
418
|
-
# Call /answer API with the session ID generated in the first call.
|
|
419
|
-
# Here, the answer generation happens in the context of the search
|
|
420
|
-
# results from the first search call.
|
|
421
|
-
#
|
|
422
|
-
# Multi-turn Search feature is currently at private GA stage. Please use
|
|
423
|
-
# v1alpha or v1beta version instead before we launch this feature to public
|
|
424
|
-
# GA. Or ask for allowlisting through Google Support team.
|
|
425
|
-
# @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash]
|
|
426
|
-
# Session specification.
|
|
427
|
-
#
|
|
428
|
-
# Can be used only when `session` is set.
|
|
429
|
-
# @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold]
|
|
430
|
-
# The relevance threshold of the search results.
|
|
431
|
-
#
|
|
432
|
-
# Default to Google defined threshold, leveraging a balance of
|
|
433
|
-
# precision and recall to deliver both highly accurate results and
|
|
434
|
-
# comprehensive coverage of relevant information.
|
|
435
|
-
#
|
|
436
|
-
# This feature is not supported for healthcare search.
|
|
437
|
-
# @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash]
|
|
438
|
-
# Optional. The specification for returning the relevance score.
|
|
439
396
|
# @param ranking_expression [::String]
|
|
440
|
-
# The ranking expression controls the customized ranking on
|
|
441
|
-
# documents. This overrides
|
|
397
|
+
# Optional. The ranking expression controls the customized ranking on
|
|
398
|
+
# retrieval documents. This overrides
|
|
442
399
|
# {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
|
|
443
400
|
# The syntax and supported features depend on the
|
|
444
401
|
# `ranking_expression_backend` value. If `ranking_expression_backend` is not
|
|
@@ -528,7 +485,90 @@ module Google
|
|
|
528
485
|
# the document.
|
|
529
486
|
# * `base_rank`: the default rank of the result
|
|
530
487
|
# @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend]
|
|
531
|
-
# The backend to use for the ranking expression evaluation.
|
|
488
|
+
# Optional. The backend to use for the ranking expression evaluation.
|
|
489
|
+
# @param safe_search [::Boolean]
|
|
490
|
+
# Whether to turn on safe search. This is only supported for
|
|
491
|
+
# website search.
|
|
492
|
+
# @param user_labels [::Hash{::String => ::String}]
|
|
493
|
+
# The user labels applied to a resource must meet the following requirements:
|
|
494
|
+
#
|
|
495
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
496
|
+
# * Each label must be a key-value pair.
|
|
497
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
498
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
|
499
|
+
# length of 63 characters.
|
|
500
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
501
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
502
|
+
# international characters are allowed.
|
|
503
|
+
# * The key portion of a label must be unique. However, you can use the same
|
|
504
|
+
# key with multiple resources.
|
|
505
|
+
# * Keys must start with a lowercase letter or international character.
|
|
506
|
+
#
|
|
507
|
+
# See [Google Cloud
|
|
508
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
509
|
+
# for more details.
|
|
510
|
+
# @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash]
|
|
511
|
+
# Optional. Config for natural language query understanding capabilities,
|
|
512
|
+
# such as extracting structured field filters from the query. Refer to [this
|
|
513
|
+
# documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
|
|
514
|
+
# for more information.
|
|
515
|
+
# If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
|
516
|
+
# natural language query understanding will be done.
|
|
517
|
+
# @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash]
|
|
518
|
+
# Search as you type configuration. Only supported for the
|
|
519
|
+
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
|
520
|
+
# vertical.
|
|
521
|
+
# @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash]
|
|
522
|
+
# Optional. Config for display feature, like match highlighting on search
|
|
523
|
+
# results.
|
|
524
|
+
# @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>]
|
|
525
|
+
# Optional. Crowding specifications for improving result diversity.
|
|
526
|
+
# If multiple CrowdingSpecs are specified, crowding will be evaluated on
|
|
527
|
+
# each unique combination of the `field` values, and max_count will be the
|
|
528
|
+
# maximum value of `max_count` across all CrowdingSpecs.
|
|
529
|
+
# For example, if the first CrowdingSpec has `field` = "color" and
|
|
530
|
+
# `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
|
|
531
|
+
# `max_count` = 2, then after 3 documents that share the same color AND size
|
|
532
|
+
# have been returned, subsequent ones should be
|
|
533
|
+
# removed or demoted.
|
|
534
|
+
# @param session [::String]
|
|
535
|
+
# The session resource name. Optional.
|
|
536
|
+
#
|
|
537
|
+
# Session allows users to do multi-turn /search API calls or coordination
|
|
538
|
+
# between /search API calls and /answer API calls.
|
|
539
|
+
#
|
|
540
|
+
# Example #1 (multi-turn /search API calls):
|
|
541
|
+
# Call /search API with the session ID generated in the first call.
|
|
542
|
+
# Here, the previous search query gets considered in query
|
|
543
|
+
# standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
|
544
|
+
# and the current query is "How about 2023?", the current query will
|
|
545
|
+
# be interpreted as "How did Alphabet do in 2023?".
|
|
546
|
+
#
|
|
547
|
+
# Example #2 (coordination between /search API calls and /answer API calls):
|
|
548
|
+
# Call /answer API with the session ID generated in the first call.
|
|
549
|
+
# Here, the answer generation happens in the context of the search
|
|
550
|
+
# results from the first search call.
|
|
551
|
+
#
|
|
552
|
+
# Multi-turn Search feature is currently at private GA stage. Please use
|
|
553
|
+
# v1alpha or v1beta version instead before we launch this feature to public
|
|
554
|
+
# GA. Or ask for allowlisting through Google Support team.
|
|
555
|
+
# @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash]
|
|
556
|
+
# Session specification.
|
|
557
|
+
#
|
|
558
|
+
# Can be used only when `session` is set.
|
|
559
|
+
# @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold]
|
|
560
|
+
# The global relevance threshold of the search results.
|
|
561
|
+
#
|
|
562
|
+
# Defaults to Google defined threshold, leveraging a balance of
|
|
563
|
+
# precision and recall to deliver both highly accurate results and
|
|
564
|
+
# comprehensive coverage of relevant information.
|
|
565
|
+
#
|
|
566
|
+
# If more granular relevance filtering is required, use the
|
|
567
|
+
# `relevance_filter_spec` instead.
|
|
568
|
+
#
|
|
569
|
+
# This feature is not supported for healthcare search.
|
|
570
|
+
# @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash]
|
|
571
|
+
# Optional. The specification for returning the relevance score.
|
|
532
572
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
533
573
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>]
|
|
534
574
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -618,7 +658,7 @@ module Google
|
|
|
618
658
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
619
659
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
620
660
|
#
|
|
621
|
-
# @overload search_lite(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil,
|
|
661
|
+
# @overload search_lite(serving_config: nil, branch: nil, query: nil, page_categories: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, one_box_page_size: nil, data_store_specs: nil, filter: nil, canonical_filter: nil, order_by: nil, user_info: nil, language_code: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, ranking_expression: nil, ranking_expression_backend: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, display_spec: nil, crowding_specs: nil, session: nil, session_spec: nil, relevance_threshold: nil, relevance_score_spec: nil)
|
|
622
662
|
# Pass arguments to `search_lite` via keyword arguments. Note that at
|
|
623
663
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
624
664
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -638,6 +678,24 @@ module Google
|
|
|
638
678
|
# documents under the default branch.
|
|
639
679
|
# @param query [::String]
|
|
640
680
|
# Raw search query.
|
|
681
|
+
# @param page_categories [::Array<::String>]
|
|
682
|
+
# Optional. The categories associated with a category page. Must be set for
|
|
683
|
+
# category navigation queries to achieve good search quality. The format
|
|
684
|
+
# should be the same as
|
|
685
|
+
# {::Google::Cloud::DiscoveryEngine::V1::PageInfo#page_category PageInfo.page_category}.
|
|
686
|
+
# This field is the equivalent of the query for browse (navigation) queries.
|
|
687
|
+
# It's used by the browse model when the query is empty.
|
|
688
|
+
#
|
|
689
|
+
# If the field is empty, it will not be used by the browse model.
|
|
690
|
+
# If the field contains more than one element, only the first element will
|
|
691
|
+
# be used.
|
|
692
|
+
#
|
|
693
|
+
# To represent full path of a category, use '>' character to separate
|
|
694
|
+
# different hierarchies. If '>' is part of the category name, replace it with
|
|
695
|
+
# other character(s).
|
|
696
|
+
# For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
|
|
697
|
+
# 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
|
|
698
|
+
# > Founders Edition`
|
|
641
699
|
# @param image_query [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ImageQuery, ::Hash]
|
|
642
700
|
# Raw image query.
|
|
643
701
|
# @param page_size [::Integer]
|
|
@@ -668,6 +726,8 @@ module Google
|
|
|
668
726
|
# unset.
|
|
669
727
|
#
|
|
670
728
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
|
729
|
+
#
|
|
730
|
+
# A large offset may be capped to a reasonable threshold.
|
|
671
731
|
# @param one_box_page_size [::Integer]
|
|
672
732
|
# The maximum number of results to return for OneBox.
|
|
673
733
|
# This applies to each OneBox type individually.
|
|
@@ -765,10 +825,10 @@ module Google
|
|
|
765
825
|
# The spell correction specification that specifies the mode under
|
|
766
826
|
# which spell correction takes effect.
|
|
767
827
|
# @param user_pseudo_id [::String]
|
|
768
|
-
# A unique identifier for tracking visitors. For example, this
|
|
769
|
-
# implemented with an HTTP cookie, which should be able to uniquely
|
|
770
|
-
# a visitor on a single device. This unique identifier should not
|
|
771
|
-
# the visitor logs in or out of the website.
|
|
828
|
+
# Optional. A unique identifier for tracking visitors. For example, this
|
|
829
|
+
# could be implemented with an HTTP cookie, which should be able to uniquely
|
|
830
|
+
# identify a visitor on a single device. This unique identifier should not
|
|
831
|
+
# change if the visitor logs in or out of the website.
|
|
772
832
|
#
|
|
773
833
|
# This field should NOT have a fixed value such as `unknown_visitor`.
|
|
774
834
|
#
|
|
@@ -781,72 +841,9 @@ module Google
|
|
|
781
841
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
782
842
|
# @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec, ::Hash]
|
|
783
843
|
# A specification for configuring the behavior of content search.
|
|
784
|
-
# @param safe_search [::Boolean]
|
|
785
|
-
# Whether to turn on safe search. This is only supported for
|
|
786
|
-
# website search.
|
|
787
|
-
# @param user_labels [::Hash{::String => ::String}]
|
|
788
|
-
# The user labels applied to a resource must meet the following requirements:
|
|
789
|
-
#
|
|
790
|
-
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
791
|
-
# * Each label must be a key-value pair.
|
|
792
|
-
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
793
|
-
# characters and cannot be empty. Values can be empty and have a maximum
|
|
794
|
-
# length of 63 characters.
|
|
795
|
-
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
796
|
-
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
797
|
-
# international characters are allowed.
|
|
798
|
-
# * The key portion of a label must be unique. However, you can use the same
|
|
799
|
-
# key with multiple resources.
|
|
800
|
-
# * Keys must start with a lowercase letter or international character.
|
|
801
|
-
#
|
|
802
|
-
# See [Google Cloud
|
|
803
|
-
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
804
|
-
# for more details.
|
|
805
|
-
# @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash]
|
|
806
|
-
# Search as you type configuration. Only supported for the
|
|
807
|
-
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
|
808
|
-
# vertical.
|
|
809
|
-
# @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash]
|
|
810
|
-
# Optional. Config for display feature, like match highlighting on search
|
|
811
|
-
# results.
|
|
812
|
-
# @param session [::String]
|
|
813
|
-
# The session resource name. Optional.
|
|
814
|
-
#
|
|
815
|
-
# Session allows users to do multi-turn /search API calls or coordination
|
|
816
|
-
# between /search API calls and /answer API calls.
|
|
817
|
-
#
|
|
818
|
-
# Example #1 (multi-turn /search API calls):
|
|
819
|
-
# Call /search API with the session ID generated in the first call.
|
|
820
|
-
# Here, the previous search query gets considered in query
|
|
821
|
-
# standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
|
822
|
-
# and the current query is "How about 2023?", the current query will
|
|
823
|
-
# be interpreted as "How did Alphabet do in 2023?".
|
|
824
|
-
#
|
|
825
|
-
# Example #2 (coordination between /search API calls and /answer API calls):
|
|
826
|
-
# Call /answer API with the session ID generated in the first call.
|
|
827
|
-
# Here, the answer generation happens in the context of the search
|
|
828
|
-
# results from the first search call.
|
|
829
|
-
#
|
|
830
|
-
# Multi-turn Search feature is currently at private GA stage. Please use
|
|
831
|
-
# v1alpha or v1beta version instead before we launch this feature to public
|
|
832
|
-
# GA. Or ask for allowlisting through Google Support team.
|
|
833
|
-
# @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash]
|
|
834
|
-
# Session specification.
|
|
835
|
-
#
|
|
836
|
-
# Can be used only when `session` is set.
|
|
837
|
-
# @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold]
|
|
838
|
-
# The relevance threshold of the search results.
|
|
839
|
-
#
|
|
840
|
-
# Default to Google defined threshold, leveraging a balance of
|
|
841
|
-
# precision and recall to deliver both highly accurate results and
|
|
842
|
-
# comprehensive coverage of relevant information.
|
|
843
|
-
#
|
|
844
|
-
# This feature is not supported for healthcare search.
|
|
845
|
-
# @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash]
|
|
846
|
-
# Optional. The specification for returning the relevance score.
|
|
847
844
|
# @param ranking_expression [::String]
|
|
848
|
-
# The ranking expression controls the customized ranking on
|
|
849
|
-
# documents. This overrides
|
|
845
|
+
# Optional. The ranking expression controls the customized ranking on
|
|
846
|
+
# retrieval documents. This overrides
|
|
850
847
|
# {::Google::Cloud::DiscoveryEngine::V1::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
|
|
851
848
|
# The syntax and supported features depend on the
|
|
852
849
|
# `ranking_expression_backend` value. If `ranking_expression_backend` is not
|
|
@@ -936,7 +933,90 @@ module Google
|
|
|
936
933
|
# the document.
|
|
937
934
|
# * `base_rank`: the default rank of the result
|
|
938
935
|
# @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RankingExpressionBackend]
|
|
939
|
-
# The backend to use for the ranking expression evaluation.
|
|
936
|
+
# Optional. The backend to use for the ranking expression evaluation.
|
|
937
|
+
# @param safe_search [::Boolean]
|
|
938
|
+
# Whether to turn on safe search. This is only supported for
|
|
939
|
+
# website search.
|
|
940
|
+
# @param user_labels [::Hash{::String => ::String}]
|
|
941
|
+
# The user labels applied to a resource must meet the following requirements:
|
|
942
|
+
#
|
|
943
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
|
944
|
+
# * Each label must be a key-value pair.
|
|
945
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
|
946
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
|
947
|
+
# length of 63 characters.
|
|
948
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
|
949
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
950
|
+
# international characters are allowed.
|
|
951
|
+
# * The key portion of a label must be unique. However, you can use the same
|
|
952
|
+
# key with multiple resources.
|
|
953
|
+
# * Keys must start with a lowercase letter or international character.
|
|
954
|
+
#
|
|
955
|
+
# See [Google Cloud
|
|
956
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
957
|
+
# for more details.
|
|
958
|
+
# @param natural_language_query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec, ::Hash]
|
|
959
|
+
# Optional. Config for natural language query understanding capabilities,
|
|
960
|
+
# such as extracting structured field filters from the query. Refer to [this
|
|
961
|
+
# documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
|
|
962
|
+
# for more information.
|
|
963
|
+
# If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
|
964
|
+
# natural language query understanding will be done.
|
|
965
|
+
# @param search_as_you_type_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec, ::Hash]
|
|
966
|
+
# Search as you type configuration. Only supported for the
|
|
967
|
+
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
|
968
|
+
# vertical.
|
|
969
|
+
# @param display_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec, ::Hash]
|
|
970
|
+
# Optional. Config for display feature, like match highlighting on search
|
|
971
|
+
# results.
|
|
972
|
+
# @param crowding_specs [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::CrowdingSpec, ::Hash>]
|
|
973
|
+
# Optional. Crowding specifications for improving result diversity.
|
|
974
|
+
# If multiple CrowdingSpecs are specified, crowding will be evaluated on
|
|
975
|
+
# each unique combination of the `field` values, and max_count will be the
|
|
976
|
+
# maximum value of `max_count` across all CrowdingSpecs.
|
|
977
|
+
# For example, if the first CrowdingSpec has `field` = "color" and
|
|
978
|
+
# `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
|
|
979
|
+
# `max_count` = 2, then after 3 documents that share the same color AND size
|
|
980
|
+
# have been returned, subsequent ones should be
|
|
981
|
+
# removed or demoted.
|
|
982
|
+
# @param session [::String]
|
|
983
|
+
# The session resource name. Optional.
|
|
984
|
+
#
|
|
985
|
+
# Session allows users to do multi-turn /search API calls or coordination
|
|
986
|
+
# between /search API calls and /answer API calls.
|
|
987
|
+
#
|
|
988
|
+
# Example #1 (multi-turn /search API calls):
|
|
989
|
+
# Call /search API with the session ID generated in the first call.
|
|
990
|
+
# Here, the previous search query gets considered in query
|
|
991
|
+
# standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
|
992
|
+
# and the current query is "How about 2023?", the current query will
|
|
993
|
+
# be interpreted as "How did Alphabet do in 2023?".
|
|
994
|
+
#
|
|
995
|
+
# Example #2 (coordination between /search API calls and /answer API calls):
|
|
996
|
+
# Call /answer API with the session ID generated in the first call.
|
|
997
|
+
# Here, the answer generation happens in the context of the search
|
|
998
|
+
# results from the first search call.
|
|
999
|
+
#
|
|
1000
|
+
# Multi-turn Search feature is currently at private GA stage. Please use
|
|
1001
|
+
# v1alpha or v1beta version instead before we launch this feature to public
|
|
1002
|
+
# GA. Or ask for allowlisting through Google Support team.
|
|
1003
|
+
# @param session_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec, ::Hash]
|
|
1004
|
+
# Session specification.
|
|
1005
|
+
#
|
|
1006
|
+
# Can be used only when `session` is set.
|
|
1007
|
+
# @param relevance_threshold [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold]
|
|
1008
|
+
# The global relevance threshold of the search results.
|
|
1009
|
+
#
|
|
1010
|
+
# Defaults to Google defined threshold, leveraging a balance of
|
|
1011
|
+
# precision and recall to deliver both highly accurate results and
|
|
1012
|
+
# comprehensive coverage of relevant information.
|
|
1013
|
+
#
|
|
1014
|
+
# If more granular relevance filtering is required, use the
|
|
1015
|
+
# `relevance_filter_spec` instead.
|
|
1016
|
+
#
|
|
1017
|
+
# This feature is not supported for healthcare search.
|
|
1018
|
+
# @param relevance_score_spec [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec, ::Hash]
|
|
1019
|
+
# Optional. The specification for returning the relevance score.
|
|
940
1020
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
941
1021
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>]
|
|
942
1022
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -13,7 +13,7 @@ require 'google/cloud/discoveryengine/v1/schema_pb'
|
|
|
13
13
|
require 'google/protobuf/timestamp_pb'
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/discoveryengine/v1/cmek_config_service.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
|
16
|
+
descriptor_data = "\n0google/cloud/discoveryengine/v1/data_store.proto\x12\x1fgoogle.cloud.discoveryengine.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/discoveryengine/v1/cmek_config_service.proto\x1a,google/cloud/discoveryengine/v1/common.proto\x1a@google/cloud/discoveryengine/v1/document_processing_config.proto\x1a,google/cloud/discoveryengine/v1/schema.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xec\x0e\n\tDataStore\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x11industry_vertical\x18\x03 \x01(\x0e\x32\x31.google.cloud.discoveryengine.v1.IndustryVerticalB\x03\xe0\x41\x05\x12\x45\n\x0esolution_types\x18\x05 \x03(\x0e\x32-.google.cloud.discoveryengine.v1.SolutionType\x12\x1e\n\x11\x64\x65\x66\x61ult_schema_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12U\n\x0e\x63ontent_config\x18\x06 \x01(\x0e\x32\x38.google.cloud.discoveryengine.v1.DataStore.ContentConfigB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x63\n\x1b\x61\x64vanced_site_search_config\x18\x0c \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.AdvancedSiteSearchConfigB\x03\xe0\x41\x01\x12\x82\x01\n+natural_language_query_understanding_config\x18\" \x01(\x0b\x32H.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfigB\x03\xe0\x41\x01\x12\x19\n\x0ckms_key_name\x18 \x01(\tB\x03\xe0\x41\x04\x12\x45\n\x0b\x63mek_config\x18\x12 \x01(\x0b\x32+.google.cloud.discoveryengine.v1.CmekConfigB\x03\xe0\x41\x03\x12]\n\x12\x62illing_estimation\x18\x17 \x01(\x0b\x32<.google.cloud.discoveryengine.v1.DataStore.BillingEstimationB\x03\xe0\x41\x03\x12\x18\n\x0b\x61\x63l_enabled\x18\x18 \x01(\x08\x42\x03\xe0\x41\x05\x12J\n\x10workspace_config\x18\x19 \x01(\x0b\x32\x30.google.cloud.discoveryengine.v1.WorkspaceConfig\x12]\n\x1a\x64ocument_processing_config\x18\x1b \x01(\x0b\x32\x39.google.cloud.discoveryengine.v1.DocumentProcessingConfig\x12@\n\x0fstarting_schema\x18\x1c \x01(\x0b\x32\'.google.cloud.discoveryengine.v1.Schema\x12Z\n\x16healthcare_fhir_config\x18\x1d \x01(\x0b\x32\x35.google.cloud.discoveryengine.v1.HealthcareFhirConfigB\x03\xe0\x41\x01\x12[\n\x16identity_mapping_store\x18\x1f \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3discoveryengine.googleapis.com/IdentityMappingStore\x1a\xae\x02\n\x11\x42illingEstimation\x12\x1c\n\x14structured_data_size\x18\x01 \x01(\x03\x12\x1e\n\x16unstructured_data_size\x18\x02 \x01(\x03\x12\x19\n\x11website_data_size\x18\x03 \x01(\x03\x12?\n\x1bstructured_data_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x41\n\x1dunstructured_data_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x18website_data_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x7f\n\rContentConfig\x12\x1e\n\x1a\x43ONTENT_CONFIG_UNSPECIFIED\x10\x00\x12\x0e\n\nNO_CONTENT\x10\x01\x12\x14\n\x10\x43ONTENT_REQUIRED\x10\x02\x12\x12\n\x0ePUBLIC_WEBSITE\x10\x03\x12\x14\n\x10GOOGLE_WORKSPACE\x10\x04:\xc9\x01\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\"\x9e\x01\n\x18\x41\x64vancedSiteSearchConfig\x12\"\n\x15\x64isable_initial_index\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12&\n\x19\x64isable_automatic_refresh\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x18\n\x16_disable_initial_indexB\x1c\n\x1a_disable_automatic_refresh\"\xbf\x01\n\'NaturalLanguageQueryUnderstandingConfig\x12[\n\x04mode\x18\x01 \x01(\x0e\x32M.google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xf5\x02\n\x0fWorkspaceConfig\x12\x43\n\x04type\x18\x01 \x01(\x0e\x32\x35.google.cloud.discoveryengine.v1.WorkspaceConfig.Type\x12\x1a\n\x12\x64\x61sher_customer_id\x18\x02 \x01(\t\x12(\n\x1bsuper_admin_service_account\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19super_admin_email_address\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xae\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cGOOGLE_DRIVE\x10\x01\x12\x0f\n\x0bGOOGLE_MAIL\x10\x02\x12\x10\n\x0cGOOGLE_SITES\x10\x03\x12\x13\n\x0fGOOGLE_CALENDAR\x10\x04\x12\x0f\n\x0bGOOGLE_CHAT\x10\x05\x12\x11\n\rGOOGLE_GROUPS\x10\x06\x12\x0f\n\x0bGOOGLE_KEEP\x10\x07\x12\x11\n\rGOOGLE_PEOPLE\x10\x08\x42\x81\x02\n#com.google.cloud.discoveryengine.v1B\x0e\x44\x61taStoreProtoP\x01ZMcloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02\x1fGoogle.Cloud.DiscoveryEngine.V1\xca\x02\x1fGoogle\\Cloud\\DiscoveryEngine\\V1\xea\x02\"Google::Cloud::DiscoveryEngine::V1b\x06proto3"
|
|
17
17
|
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
19
19
|
|
|
@@ -52,6 +52,8 @@ module Google
|
|
|
52
52
|
DataStore::BillingEstimation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DataStore.BillingEstimation").msgclass
|
|
53
53
|
DataStore::ContentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.DataStore.ContentConfig").enummodule
|
|
54
54
|
AdvancedSiteSearchConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.AdvancedSiteSearchConfig").msgclass
|
|
55
|
+
NaturalLanguageQueryUnderstandingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig").msgclass
|
|
56
|
+
NaturalLanguageQueryUnderstandingConfig::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.NaturalLanguageQueryUnderstandingConfig.Mode").enummodule
|
|
55
57
|
WorkspaceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.WorkspaceConfig").msgclass
|
|
56
58
|
WorkspaceConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1.WorkspaceConfig.Type").enummodule
|
|
57
59
|
end
|