google-cloud-discovery_engine-v1beta 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +12 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +12 -1
  4. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +12 -1
  5. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +12 -1
  6. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +12 -1
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +12 -1
  8. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +12 -1
  9. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +12 -1
  10. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/operations.rb +12 -1
  11. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/operations.rb +12 -1
  12. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +12 -1
  13. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +12 -1
  14. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/operations.rb +12 -1
  15. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/operations.rb +12 -1
  16. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +12 -1
  17. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +12 -1
  18. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +142 -10
  19. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +142 -10
  20. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +12 -1
  21. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +12 -1
  22. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +12 -1
  23. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +12 -1
  24. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +12 -1
  25. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +12 -1
  26. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  27. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +4 -1
  28. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +132 -4
  29. data/proto_docs/google/longrunning/operations.rb +18 -0
  30. metadata +3 -3
@@ -217,7 +217,7 @@ module Google
217
217
  # @param options [::Gapic::CallOptions, ::Hash]
218
218
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
219
219
  #
220
- # @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, region_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, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
220
+ # @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, region_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, embedding_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, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
221
221
  # Pass arguments to `search` via keyword arguments. Note that at
222
222
  # least one keyword argument is required. To specify no parameters, or to keep all
223
223
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -397,8 +397,14 @@ module Google
397
397
  # The ranking expression controls the customized ranking on retrieval
398
398
  # documents. This overrides
399
399
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
400
- # The ranking expression is a single function or multiple functions that are
401
- # joined by "+".
400
+ # The syntax and supported features depend on the
401
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
402
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
403
+ #
404
+ # If
405
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
406
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
407
+ # function or multiple functions that are joined by "+".
402
408
  #
403
409
  # * ranking_expression = function, { " + ", function };
404
410
  #
@@ -413,13 +419,73 @@ module Google
413
419
  # between query and document.
414
420
  # * `embedding_field_path`: the document embedding field
415
421
  # used with query embedding vector.
416
- # * `dotProduct`: embedding function between embedding_field_path and query
417
- # embedding vector.
422
+ # * `dotProduct`: embedding function between `embedding_field_path` and
423
+ # query embedding vector.
418
424
  #
419
425
  # Example ranking expression:
420
426
  #
421
427
  # If document has an embedding field doc_embedding, the ranking expression
422
428
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
429
+ #
430
+ # If
431
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
432
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
433
+ # combinations of those chained using + or
434
+ # * operators) are supported:
435
+ #
436
+ # * `double`
437
+ # * `signal`
438
+ # * `log(signal)`
439
+ # * `exp(signal)`
440
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
441
+ # argument being a denominator constant.
442
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
443
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
444
+ # signal2 | double, else returns signal1.
445
+ #
446
+ # Here are a few examples of ranking formulas that use the supported
447
+ # ranking expression types:
448
+ #
449
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
450
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
451
+ # `semantic_smilarity_score` adjustment.
452
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
453
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
454
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
455
+ # add constant 0.3 adjustment to the final score if
456
+ # `semantic_similarity_score` is NaN.
457
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
458
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
459
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
460
+ # of `semantic_smilarity_score`.
461
+ #
462
+ # The following signals are supported:
463
+ #
464
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
465
+ # calculated using the embeddings generated by a proprietary Google model.
466
+ # This score determines how semantically similar a search query is to a
467
+ # document.
468
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
469
+ # Match 25 (BM25) ranking function. This score is calculated using a
470
+ # probabilistic model to estimate the probability that a document is
471
+ # relevant to a given query.
472
+ # * `relevance_score`: semantic relevance adjustment that uses a
473
+ # proprietary Google model to determine the meaning and intent behind a
474
+ # user's query in context with the content in the documents.
475
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
476
+ # predicted Click-through rate (pCTR) to gauge the relevance and
477
+ # attractiveness of a search result from a user's perspective. A higher
478
+ # pCTR suggests that the result is more likely to satisfy the user's query
479
+ # and intent, making it a valuable signal for ranking.
480
+ # * `freshness_rank`: freshness adjustment as a rank
481
+ # * `document_age`: The time in hours elapsed since the document was last
482
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
483
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
484
+ # Google model to determine the keyword-based overlap between the query and
485
+ # the document.
486
+ # * `base_rank`: the default rank of the result
487
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
488
+ # The backend to use for the ranking expression evaluation.
423
489
  # @param safe_search [::Boolean]
424
490
  # Whether to turn on safe search. This is only supported for
425
491
  # website search.
@@ -586,7 +652,7 @@ module Google
586
652
  # @param options [::Gapic::CallOptions, ::Hash]
587
653
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
588
654
  #
589
- # @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, region_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, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
655
+ # @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, region_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, embedding_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, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
590
656
  # Pass arguments to `search_lite` via keyword arguments. Note that at
591
657
  # least one keyword argument is required. To specify no parameters, or to keep all
592
658
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -766,8 +832,14 @@ module Google
766
832
  # The ranking expression controls the customized ranking on retrieval
767
833
  # documents. This overrides
768
834
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
769
- # The ranking expression is a single function or multiple functions that are
770
- # joined by "+".
835
+ # The syntax and supported features depend on the
836
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
837
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
838
+ #
839
+ # If
840
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
841
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
842
+ # function or multiple functions that are joined by "+".
771
843
  #
772
844
  # * ranking_expression = function, { " + ", function };
773
845
  #
@@ -782,13 +854,73 @@ module Google
782
854
  # between query and document.
783
855
  # * `embedding_field_path`: the document embedding field
784
856
  # used with query embedding vector.
785
- # * `dotProduct`: embedding function between embedding_field_path and query
786
- # embedding vector.
857
+ # * `dotProduct`: embedding function between `embedding_field_path` and
858
+ # query embedding vector.
787
859
  #
788
860
  # Example ranking expression:
789
861
  #
790
862
  # If document has an embedding field doc_embedding, the ranking expression
791
863
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
864
+ #
865
+ # If
866
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
867
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
868
+ # combinations of those chained using + or
869
+ # * operators) are supported:
870
+ #
871
+ # * `double`
872
+ # * `signal`
873
+ # * `log(signal)`
874
+ # * `exp(signal)`
875
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
876
+ # argument being a denominator constant.
877
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
878
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
879
+ # signal2 | double, else returns signal1.
880
+ #
881
+ # Here are a few examples of ranking formulas that use the supported
882
+ # ranking expression types:
883
+ #
884
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
885
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
886
+ # `semantic_smilarity_score` adjustment.
887
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
888
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
889
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
890
+ # add constant 0.3 adjustment to the final score if
891
+ # `semantic_similarity_score` is NaN.
892
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
893
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
894
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
895
+ # of `semantic_smilarity_score`.
896
+ #
897
+ # The following signals are supported:
898
+ #
899
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
900
+ # calculated using the embeddings generated by a proprietary Google model.
901
+ # This score determines how semantically similar a search query is to a
902
+ # document.
903
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
904
+ # Match 25 (BM25) ranking function. This score is calculated using a
905
+ # probabilistic model to estimate the probability that a document is
906
+ # relevant to a given query.
907
+ # * `relevance_score`: semantic relevance adjustment that uses a
908
+ # proprietary Google model to determine the meaning and intent behind a
909
+ # user's query in context with the content in the documents.
910
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
911
+ # predicted Click-through rate (pCTR) to gauge the relevance and
912
+ # attractiveness of a search result from a user's perspective. A higher
913
+ # pCTR suggests that the result is more likely to satisfy the user's query
914
+ # and intent, making it a valuable signal for ranking.
915
+ # * `freshness_rank`: freshness adjustment as a rank
916
+ # * `document_age`: The time in hours elapsed since the document was last
917
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
918
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
919
+ # Google model to determine the keyword-based overlap between the query and
920
+ # the document.
921
+ # * `base_rank`: the default rank of the result
922
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
923
+ # The backend to use for the ranking expression evaluation.
792
924
  # @param safe_search [::Boolean]
793
925
  # Whether to turn on safe search. This is only supported for
794
926
  # website search.
@@ -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, region_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, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
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, region_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, embedding_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, session: nil, session_spec: nil, relevance_threshold: nil, personalization_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).
@@ -390,8 +390,14 @@ module Google
390
390
  # The ranking expression controls the customized ranking on retrieval
391
391
  # documents. This overrides
392
392
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
393
- # The ranking expression is a single function or multiple functions that are
394
- # joined by "+".
393
+ # The syntax and supported features depend on the
394
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
395
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
396
+ #
397
+ # If
398
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
399
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
400
+ # function or multiple functions that are joined by "+".
395
401
  #
396
402
  # * ranking_expression = function, { " + ", function };
397
403
  #
@@ -406,13 +412,73 @@ module Google
406
412
  # between query and document.
407
413
  # * `embedding_field_path`: the document embedding field
408
414
  # used with query embedding vector.
409
- # * `dotProduct`: embedding function between embedding_field_path and query
410
- # embedding vector.
415
+ # * `dotProduct`: embedding function between `embedding_field_path` and
416
+ # query embedding vector.
411
417
  #
412
418
  # Example ranking expression:
413
419
  #
414
420
  # If document has an embedding field doc_embedding, the ranking expression
415
421
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
422
+ #
423
+ # If
424
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
425
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
426
+ # combinations of those chained using + or
427
+ # * operators) are supported:
428
+ #
429
+ # * `double`
430
+ # * `signal`
431
+ # * `log(signal)`
432
+ # * `exp(signal)`
433
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
434
+ # argument being a denominator constant.
435
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
436
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
437
+ # signal2 | double, else returns signal1.
438
+ #
439
+ # Here are a few examples of ranking formulas that use the supported
440
+ # ranking expression types:
441
+ #
442
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
443
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
444
+ # `semantic_smilarity_score` adjustment.
445
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
446
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
447
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
448
+ # add constant 0.3 adjustment to the final score if
449
+ # `semantic_similarity_score` is NaN.
450
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
451
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
452
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
453
+ # of `semantic_smilarity_score`.
454
+ #
455
+ # The following signals are supported:
456
+ #
457
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
458
+ # calculated using the embeddings generated by a proprietary Google model.
459
+ # This score determines how semantically similar a search query is to a
460
+ # document.
461
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
462
+ # Match 25 (BM25) ranking function. This score is calculated using a
463
+ # probabilistic model to estimate the probability that a document is
464
+ # relevant to a given query.
465
+ # * `relevance_score`: semantic relevance adjustment that uses a
466
+ # proprietary Google model to determine the meaning and intent behind a
467
+ # user's query in context with the content in the documents.
468
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
469
+ # predicted Click-through rate (pCTR) to gauge the relevance and
470
+ # attractiveness of a search result from a user's perspective. A higher
471
+ # pCTR suggests that the result is more likely to satisfy the user's query
472
+ # and intent, making it a valuable signal for ranking.
473
+ # * `freshness_rank`: freshness adjustment as a rank
474
+ # * `document_age`: The time in hours elapsed since the document was last
475
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
476
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
477
+ # Google model to determine the keyword-based overlap between the query and
478
+ # the document.
479
+ # * `base_rank`: the default rank of the result
480
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
481
+ # The backend to use for the ranking expression evaluation.
416
482
  # @param safe_search [::Boolean]
417
483
  # Whether to turn on safe search. This is only supported for
418
484
  # website search.
@@ -572,7 +638,7 @@ module Google
572
638
  # @param options [::Gapic::CallOptions, ::Hash]
573
639
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
574
640
  #
575
- # @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, region_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, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil, natural_language_query_understanding_spec: nil, search_as_you_type_spec: nil, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
641
+ # @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, region_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, embedding_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, session: nil, session_spec: nil, relevance_threshold: nil, personalization_spec: nil)
576
642
  # Pass arguments to `search_lite` via keyword arguments. Note that at
577
643
  # least one keyword argument is required. To specify no parameters, or to keep all
578
644
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -752,8 +818,14 @@ module Google
752
818
  # The ranking expression controls the customized ranking on retrieval
753
819
  # documents. This overrides
754
820
  # {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#ranking_expression ServingConfig.ranking_expression}.
755
- # The ranking expression is a single function or multiple functions that are
756
- # joined by "+".
821
+ # The syntax and supported features depend on the
822
+ # `ranking_expression_backend` value. If `ranking_expression_backend` is not
823
+ # provided, it defaults to `RANK_BY_EMBEDDING`.
824
+ #
825
+ # If
826
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
827
+ # is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
828
+ # function or multiple functions that are joined by "+".
757
829
  #
758
830
  # * ranking_expression = function, { " + ", function };
759
831
  #
@@ -768,13 +840,73 @@ module Google
768
840
  # between query and document.
769
841
  # * `embedding_field_path`: the document embedding field
770
842
  # used with query embedding vector.
771
- # * `dotProduct`: embedding function between embedding_field_path and query
772
- # embedding vector.
843
+ # * `dotProduct`: embedding function between `embedding_field_path` and
844
+ # query embedding vector.
773
845
  #
774
846
  # Example ranking expression:
775
847
  #
776
848
  # If document has an embedding field doc_embedding, the ranking expression
777
849
  # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
850
+ #
851
+ # If
852
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#ranking_expression_backend ranking_expression_backend}
853
+ # is set to `RANK_BY_FORMULA`, the following expression types (and
854
+ # combinations of those chained using + or
855
+ # * operators) are supported:
856
+ #
857
+ # * `double`
858
+ # * `signal`
859
+ # * `log(signal)`
860
+ # * `exp(signal)`
861
+ # * `rr(signal, double > 0)` -- reciprocal rank transformation with second
862
+ # argument being a denominator constant.
863
+ # * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
864
+ # * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
865
+ # signal2 | double, else returns signal1.
866
+ #
867
+ # Here are a few examples of ranking formulas that use the supported
868
+ # ranking expression types:
869
+ #
870
+ # - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
871
+ # -- mostly rank by the logarithm of `keyword_similarity_score` with slight
872
+ # `semantic_smilarity_score` adjustment.
873
+ # - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
874
+ # is_nan(keyword_similarity_score)` -- rank by the exponent of
875
+ # `semantic_similarity_score` filling the value with 0 if it's NaN, also
876
+ # add constant 0.3 adjustment to the final score if
877
+ # `semantic_similarity_score` is NaN.
878
+ # - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
879
+ # rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
880
+ # of `keyword_similarity_score` with slight adjustment of reciprocal rank
881
+ # of `semantic_smilarity_score`.
882
+ #
883
+ # The following signals are supported:
884
+ #
885
+ # * `semantic_similarity_score`: semantic similarity adjustment that is
886
+ # calculated using the embeddings generated by a proprietary Google model.
887
+ # This score determines how semantically similar a search query is to a
888
+ # document.
889
+ # * `keyword_similarity_score`: keyword match adjustment uses the Best
890
+ # Match 25 (BM25) ranking function. This score is calculated using a
891
+ # probabilistic model to estimate the probability that a document is
892
+ # relevant to a given query.
893
+ # * `relevance_score`: semantic relevance adjustment that uses a
894
+ # proprietary Google model to determine the meaning and intent behind a
895
+ # user's query in context with the content in the documents.
896
+ # * `pctr_rank`: predicted conversion rate adjustment as a rank use
897
+ # predicted Click-through rate (pCTR) to gauge the relevance and
898
+ # attractiveness of a search result from a user's perspective. A higher
899
+ # pCTR suggests that the result is more likely to satisfy the user's query
900
+ # and intent, making it a valuable signal for ranking.
901
+ # * `freshness_rank`: freshness adjustment as a rank
902
+ # * `document_age`: The time in hours elapsed since the document was last
903
+ # updated, a floating-point number (e.g., 0.25 means 15 minutes).
904
+ # * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
905
+ # Google model to determine the keyword-based overlap between the query and
906
+ # the document.
907
+ # * `base_rank`: the default rank of the result
908
+ # @param ranking_expression_backend [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::RankingExpressionBackend]
909
+ # The backend to use for the ranking expression evaluation.
778
910
  # @param safe_search [::Boolean]
779
911
  # Whether to turn on safe search. This is only supported for
780
912
  # website search.
@@ -134,7 +134,7 @@ module Google
134
134
  # @param options [::Gapic::CallOptions, ::Hash]
135
135
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
136
136
  #
137
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
137
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
138
138
  # Pass arguments to `list_operations` via keyword arguments. Note that at
139
139
  # least one keyword argument is required. To specify no parameters, or to keep all
140
140
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -147,6 +147,17 @@ module Google
147
147
  # The standard list page size.
148
148
  # @param page_token [::String]
149
149
  # The standard list page token.
150
+ # @param return_partial_success [::Boolean]
151
+ # When set to `true`, operations that are reachable are returned as normal,
152
+ # and those that are unreachable are returned in the
153
+ # [ListOperationsResponse.unreachable] field.
154
+ #
155
+ # This can only be `true` when reading across collections e.g. when `parent`
156
+ # is set to `"projects/example/locations/-"`.
157
+ #
158
+ # This field is not by default supported and will result in an
159
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
160
+ # service or product specific documentation.
150
161
  #
151
162
  # @yield [response, operation] Access the result along with the RPC operation
152
163
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -125,7 +125,7 @@ module Google
125
125
  # @param options [::Gapic::CallOptions, ::Hash]
126
126
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
127
  #
128
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
128
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
129
129
  # Pass arguments to `list_operations` via keyword arguments. Note that at
130
130
  # least one keyword argument is required. To specify no parameters, or to keep all
131
131
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -138,6 +138,17 @@ module Google
138
138
  # The standard list page size.
139
139
  # @param page_token [::String]
140
140
  # The standard list page token.
141
+ # @param return_partial_success [::Boolean]
142
+ # When set to `true`, operations that are reachable are returned as normal,
143
+ # and those that are unreachable are returned in the
144
+ # [ListOperationsResponse.unreachable] field.
145
+ #
146
+ # This can only be `true` when reading across collections e.g. when `parent`
147
+ # is set to `"projects/example/locations/-"`.
148
+ #
149
+ # This field is not by default supported and will result in an
150
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
151
+ # service or product specific documentation.
141
152
  # @yield [result, operation] Access the result along with the TransportOperation object
142
153
  # @yieldparam result [::Gapic::Operation]
143
154
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -134,7 +134,7 @@ module Google
134
134
  # @param options [::Gapic::CallOptions, ::Hash]
135
135
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
136
136
  #
137
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
137
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
138
138
  # Pass arguments to `list_operations` via keyword arguments. Note that at
139
139
  # least one keyword argument is required. To specify no parameters, or to keep all
140
140
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -147,6 +147,17 @@ module Google
147
147
  # The standard list page size.
148
148
  # @param page_token [::String]
149
149
  # The standard list page token.
150
+ # @param return_partial_success [::Boolean]
151
+ # When set to `true`, operations that are reachable are returned as normal,
152
+ # and those that are unreachable are returned in the
153
+ # [ListOperationsResponse.unreachable] field.
154
+ #
155
+ # This can only be `true` when reading across collections e.g. when `parent`
156
+ # is set to `"projects/example/locations/-"`.
157
+ #
158
+ # This field is not by default supported and will result in an
159
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
160
+ # service or product specific documentation.
150
161
  #
151
162
  # @yield [response, operation] Access the result along with the RPC operation
152
163
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -125,7 +125,7 @@ module Google
125
125
  # @param options [::Gapic::CallOptions, ::Hash]
126
126
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
127
  #
128
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
128
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
129
129
  # Pass arguments to `list_operations` via keyword arguments. Note that at
130
130
  # least one keyword argument is required. To specify no parameters, or to keep all
131
131
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -138,6 +138,17 @@ module Google
138
138
  # The standard list page size.
139
139
  # @param page_token [::String]
140
140
  # The standard list page token.
141
+ # @param return_partial_success [::Boolean]
142
+ # When set to `true`, operations that are reachable are returned as normal,
143
+ # and those that are unreachable are returned in the
144
+ # [ListOperationsResponse.unreachable] field.
145
+ #
146
+ # This can only be `true` when reading across collections e.g. when `parent`
147
+ # is set to `"projects/example/locations/-"`.
148
+ #
149
+ # This field is not by default supported and will result in an
150
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
151
+ # service or product specific documentation.
141
152
  # @yield [result, operation] Access the result along with the TransportOperation object
142
153
  # @yieldparam result [::Gapic::Operation]
143
154
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -134,7 +134,7 @@ module Google
134
134
  # @param options [::Gapic::CallOptions, ::Hash]
135
135
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
136
136
  #
137
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
137
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
138
138
  # Pass arguments to `list_operations` via keyword arguments. Note that at
139
139
  # least one keyword argument is required. To specify no parameters, or to keep all
140
140
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -147,6 +147,17 @@ module Google
147
147
  # The standard list page size.
148
148
  # @param page_token [::String]
149
149
  # The standard list page token.
150
+ # @param return_partial_success [::Boolean]
151
+ # When set to `true`, operations that are reachable are returned as normal,
152
+ # and those that are unreachable are returned in the
153
+ # [ListOperationsResponse.unreachable] field.
154
+ #
155
+ # This can only be `true` when reading across collections e.g. when `parent`
156
+ # is set to `"projects/example/locations/-"`.
157
+ #
158
+ # This field is not by default supported and will result in an
159
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
160
+ # service or product specific documentation.
150
161
  #
151
162
  # @yield [response, operation] Access the result along with the RPC operation
152
163
  # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
@@ -125,7 +125,7 @@ module Google
125
125
  # @param options [::Gapic::CallOptions, ::Hash]
126
126
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
127
  #
128
- # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
128
+ # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil)
129
129
  # Pass arguments to `list_operations` via keyword arguments. Note that at
130
130
  # least one keyword argument is required. To specify no parameters, or to keep all
131
131
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -138,6 +138,17 @@ module Google
138
138
  # The standard list page size.
139
139
  # @param page_token [::String]
140
140
  # The standard list page token.
141
+ # @param return_partial_success [::Boolean]
142
+ # When set to `true`, operations that are reachable are returned as normal,
143
+ # and those that are unreachable are returned in the
144
+ # [ListOperationsResponse.unreachable] field.
145
+ #
146
+ # This can only be `true` when reading across collections e.g. when `parent`
147
+ # is set to `"projects/example/locations/-"`.
148
+ #
149
+ # This field is not by default supported and will result in an
150
+ # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
151
+ # service or product specific documentation.
141
152
  # @yield [result, operation] Access the result along with the TransportOperation object
142
153
  # @yieldparam result [::Gapic::Operation]
143
154
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1beta
24
- VERSION = "0.21.0"
24
+ VERSION = "0.23.0"
25
25
  end
26
26
  end
27
27
  end