@@ -33,6 +33,10 @@ option java_package = "com.google.cloud.retail.v2beta";
3333option objc_class_prefix = "RETAIL" ;
3434option php_namespace = "Google\\Cloud\\Retail\\V2beta" ;
3535option ruby_package = "Google::Cloud::Retail::V2beta" ;
36+ option (google.api.resource_definition ) = {
37+ type : "retail.googleapis.com/Experiment"
38+ pattern : "projects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}"
39+ };
3640
3741// Service for search.
3842//
@@ -112,7 +116,16 @@ message SearchRequest {
112116
113117 // Set only if values should be bucketized into intervals. Must be set
114118 // for facets with numerical values. Must not be set for facet with text
115- // values. Maximum number of intervals is 30.
119+ // values. Maximum number of intervals is 40.
120+ //
121+ // For all numerical facet keys that appear in the list of products from
122+ // the catalog, the percentiles 0, 10, 30, 50, 70, 90 and 100 are
123+ // computed from their distribution weekly. If the model assigns a high
124+ // score to a numerical facet key and its intervals are not specified in
125+ // the search request, these percentiles will become the bounds
126+ // for its intervals and will be returned in the response. If the
127+ // facet key intervals are specified in the request, then the specified
128+ // intervals will be returned instead.
116129 repeated Interval intervals = 2 ;
117130
118131 // Only get facet for the given restricted values. For example, when using
@@ -575,7 +588,7 @@ message SearchRequest {
575588
576589 // Facet specifications for faceted search. If empty, no facets are returned.
577590 //
578- // A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
591+ // A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error
579592 // is returned.
580593 repeated FacetSpec facet_specs = 12 ;
581594
@@ -675,7 +688,7 @@ message SearchRequest {
675688 // INVALID_ARGUMENT error is returned.
676689 repeated string variant_rollup_keys = 17 ;
677690
678- // The categories associated with a category page. Required for category
691+ // The categories associated with a category page. Must be set for category
679692 // navigation queries to achieve good search quality. The format should be
680693 // the same as
681694 // [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
@@ -727,6 +740,14 @@ message SearchRequest {
727740 // The spell correction specification that specifies the mode under
728741 // which spell correction will take effect.
729742 optional SpellCorrectionSpec spell_correction_spec = 35 ;
743+
744+ // The entity for customers that may run multiple different entities, domains,
745+ // sites or regions, for example, `Google US`, `Google Ads`, `Waymo`,
746+ // `google.com`, `youtube.com`, etc.
747+ // If this is set, it should be exactly matched with
748+ // [UserEvent.entity][google.cloud.retail.v2beta.UserEvent.entity] to get
749+ // search results boosted by entity.
750+ string entity = 38 ;
730751}
731752
732753// Response message for
@@ -926,4 +947,44 @@ message SearchResponse {
926947 // that are not applied during serving.
927948 repeated SearchRequest.BoostSpec.ConditionBoostSpec
928949 invalid_condition_boost_specs = 14;
950+
951+ // Metadata related to A/B testing [Experiment][] associated with this
952+ // response. Only exists when an experiment is triggered.
953+ repeated ExperimentInfo experiment_info = 17 ;
954+ }
955+
956+ // Metadata for active A/B testing [Experiments][].
957+ message ExperimentInfo {
958+ // Metadata for active serving config A/B tests.
959+ message ServingConfigExperiment {
960+ // The fully qualified resource name of the original
961+ // [SearchRequest.placement][google.cloud.retail.v2beta.SearchRequest.placement]
962+ // in the search request prior to reassignment by experiment API. For
963+ // example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.
964+ string original_serving_config = 1 [(google.api.resource_reference ) = {
965+ type : "retail.googleapis.com/ServingConfig"
966+ }];
967+
968+ // The fully qualified resource name of the serving config
969+ // [VariantArm.serving_config_id][] responsible for generating the search
970+ // response. For example:
971+ // `projects/*/locations/*/catalogs/*/servingConfigs/*`.
972+ string experiment_serving_config = 2 [(google.api.resource_reference ) = {
973+ type : "retail.googleapis.com/ServingConfig"
974+ }];
975+ }
976+
977+ // Information associated with the specific experiment entity being recorded.
978+ oneof experiment_metadata {
979+ // A/B test between existing Cloud Retail Search
980+ // [ServingConfig][google.cloud.retail.v2beta.ServingConfig]s.
981+ ServingConfigExperiment serving_config_experiment = 2 ;
982+ }
983+
984+ // The fully qualified resource name of the experiment that provides the
985+ // serving config under test, should an active experiment exist. For example:
986+ // `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`
987+ string experiment = 1 [(google.api.resource_reference ) = {
988+ type : "retail.googleapis.com/Experiment"
989+ }];
929990}
0 commit comments