@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
2020import "google/api/resource.proto" ;
2121import "google/cloud/retail/v2beta/common.proto" ;
2222import "google/cloud/retail/v2beta/import_config.proto" ;
23+ import "google/protobuf/timestamp.proto" ;
2324
2425option csharp_namespace = "Google.Cloud.Retail.V2Beta" ;
2526option go_package = "cloud.google.com/go/retail/apiv2beta/retailpb;retailpb" ;
@@ -87,6 +88,124 @@ message ProductLevelConfig {
8788// Catalog level attribute config for an attribute. For example, if customers
8889// want to enable/disable facet for a specific attribute.
8990message CatalogAttribute {
91+ // Possible options for the facet that corresponds to the current attribute
92+ // config.
93+ message FacetConfig {
94+ // [Facet values][google.cloud.retail.v2beta.SearchResponse.Facet.values] to
95+ // ignore on [facets][google.cloud.retail.v2beta.SearchResponse.Facet]
96+ // during the specified time range for the given
97+ // [SearchResponse.Facet.key][google.cloud.retail.v2beta.SearchResponse.Facet.key]
98+ // attribute.
99+ message IgnoredFacetValues {
100+ // List of facet values to ignore for the following time range. The facet
101+ // values are the same as the attribute values. There is a limit of 10
102+ // values per instance of IgnoredFacetValues. Each value can have at most
103+ // 128 characters.
104+ repeated string values = 1 ;
105+
106+ // Time range for the current list of facet values to ignore.
107+ // If multiple time ranges are specified for an facet value for the
108+ // current attribute, consider all of them. If both are empty, ignore
109+ // always. If start time and end time are set, then start time
110+ // must be before end time.
111+ // If start time is not empty and end time is empty, then will ignore
112+ // these facet values after the start time.
113+ google.protobuf.Timestamp start_time = 2 ;
114+
115+ // If start time is empty and end time is not empty, then ignore these
116+ // facet values before end time.
117+ google.protobuf.Timestamp end_time = 3 ;
118+ }
119+
120+ // Replaces a set of textual facet values by the same (possibly different)
121+ // merged facet value. Each facet value should appear at most once as a
122+ // value per
123+ // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]. This
124+ // feature is available only for textual custom attributes.
125+ message MergedFacetValue {
126+ // All the facet values that are replaces by the same
127+ // [merged_value][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacetValue.merged_value]
128+ // that follows. The maximum number of values per MergedFacetValue is 25.
129+ // Each value can have up to 128 characters.
130+ repeated string values = 1 ;
131+
132+ // All the previous values are replaced by this merged facet value.
133+ // This merged_value must be non-empty and can have up to 128 characters.
134+ string merged_value = 2 ;
135+ }
136+
137+ // The current facet key (i.e. attribute config) maps into the
138+ // [merged_facet_key][google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.MergedFacet.merged_facet_key].
139+ // A facet key can have at most one child. The current facet key and the
140+ // merged facet key need both to be textual custom attributes or both
141+ // numerical custom attributes (same type).
142+ message MergedFacet {
143+ // The merged facet key should be a valid facet key that is different than
144+ // the facet key of the current catalog attribute. We refer this is
145+ // merged facet key as the child of the current catalog attribute. This
146+ // merged facet key can't be a parent of another facet key (i.e. no
147+ // directed path of length 2). This merged facet key needs to be either a
148+ // textual custom attribute or a numerical custom attribute.
149+ string merged_facet_key = 1 ;
150+ }
151+
152+ // Options to rerank based on facet values engaged by the user for the
153+ // current key. That key needs to be a custom textual key and facetable.
154+ // To use this control, you also need to pass all the facet keys engaged by
155+ // the user in the request using the field [SearchRequest.FacetSpec]. In
156+ // particular, if you don't pass the facet keys engaged that you want to
157+ // rerank on, this control won't be effective. Moreover, to obtain better
158+ // results, the facet values that you want to rerank on should be close to
159+ // English (ideally made of words, underscores, and spaces).
160+ message RerankConfig {
161+ // If set to true, then we also rerank the dynamic facets based on the
162+ // facet values engaged by the user for the current attribute key during
163+ // serving.
164+ bool rerank_facet = 1 ;
165+
166+ // If empty, rerank on all facet values for the current key. Otherwise,
167+ // will rerank on the facet values from this list only.
168+ repeated string facet_values = 2 ;
169+ }
170+
171+ // If you don't set the facet
172+ // [SearchRequest.FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals]
173+ // in the request to a numerical attribute, then we use the computed
174+ // intervals with rounded bounds obtained from all its product numerical
175+ // attribute values. The computed intervals might not be ideal for some
176+ // attributes. Therefore, we give you the option to overwrite them with the
177+ // facet_intervals field. The maximum of facet intervals per
178+ // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 40.
179+ // Each interval must have a lower bound or an upper bound. If both bounds
180+ // are provided, then the lower bound must be smaller or equal than the
181+ // upper bound.
182+ repeated Interval facet_intervals = 1 ;
183+
184+ // Each instance represents a list of attribute values to ignore as facet
185+ // values for a specific time range. The maximum number of instances per
186+ // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 25.
187+ repeated IgnoredFacetValues ignored_facet_values = 2 ;
188+
189+ // Each instance replaces a list of facet values by a merged facet
190+ // value. If a facet value is not in any list, then it will stay the same.
191+ // To avoid conflicts, only paths of length 1 are accepted. In other words,
192+ // if "dark_blue" merged into "BLUE", then the latter can't merge into
193+ // "blues" because this would create a path of length 2. The maximum number
194+ // of instances of MergedFacetValue per
195+ // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] is 100.
196+ // This feature is available only for textual custom attributes.
197+ repeated MergedFacetValue merged_facet_values = 3 ;
198+
199+ // Use this field only if you want to merge a facet key into another facet
200+ // key.
201+ MergedFacet merged_facet = 4 ;
202+
203+ // Set this field only if you want to rerank based on facet values engaged
204+ // by the user for the current key. This option is only possible for custom
205+ // facetable textual keys.
206+ RerankConfig rerank_config = 5 ;
207+ }
208+
90209 // The type of an attribute.
91210 enum AttributeType {
92211 // The type of the attribute is unknown.
@@ -210,7 +329,9 @@ message CatalogAttribute {
210329 // are indexed so that it can be filtered, faceted, or boosted in
211330 // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
212331 //
213- // Must be specified, otherwise throws INVALID_FORMAT error.
332+ // Must be specified when
333+ // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
334+ // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
214335 IndexableOption indexable_option = 5 ;
215336
216337 // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
@@ -232,7 +353,9 @@ message CatalogAttribute {
232353 // [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as
233354 // there are no text values associated to numerical attributes.
234355 //
235- // Must be specified, otherwise throws INVALID_FORMAT error.
356+ // Must be specified, when
357+ // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.AttributesConfig.attribute_config_level]
358+ // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.
236359 SearchableOption searchable_option = 7 ;
237360
238361 // When
@@ -254,6 +377,9 @@ message CatalogAttribute {
254377 // results. If unset, the server behavior defaults to
255378 // [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
256379 RetrievableOption retrievable_option = 12 ;
380+
381+ // Contains facet options.
382+ FacetConfig facet_config = 13 ;
257383}
258384
259385// Catalog level attribute config.
@@ -343,8 +469,8 @@ message CompletionConfig {
343469 // Output only. Name of the LRO corresponding to the latest suggestion terms
344470 // list import.
345471 //
346- // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
347- // retrieve the latest state of the Long Running Operation.
472+ // Can use [GetOperation][google.longrunning.Operations.GetOperation] API
473+ // method to retrieve the latest state of the Long Running Operation.
348474 string last_suggestions_import_operation = 6
349475 [(google.api.field_behavior ) = OUTPUT_ONLY ];
350476
@@ -374,10 +500,10 @@ message CompletionConfig {
374500}
375501
376502// Represents a link between a Merchant Center account and a branch.
377- // Once a link is established, products from the linked merchant center account
378- // will be streamed to the linked branch.
503+ // After a link is established, products from the linked Merchant Center account
504+ // are streamed to the linked branch.
379505message MerchantCenterLink {
380- // Required. The linked [Merchant center account
506+ // Required. The linked [Merchant Center account
381507 // ID](https://developers.google.com/shopping-content/guides/accountstatuses).
382508 // The account must be a standalone account or a sub-account of a MCA.
383509 int64 merchant_center_account_id = 1 [(google.api.field_behavior ) = REQUIRED ];
@@ -387,7 +513,7 @@ message MerchantCenterLink {
387513 // empty value will use the currently configured default branch. However,
388514 // changing the default branch later on won't change the linked branch here.
389515 //
390- // A single branch ID can only have one linked merchant center account ID.
516+ // A single branch ID can only have one linked Merchant Center account ID.
391517 string branch_id = 2 ;
392518
393519 // String representing the destination to import for, all if left empty.
@@ -469,8 +595,8 @@ message Catalog {
469595 [(google.api.field_behavior ) = REQUIRED ];
470596
471597 // The Merchant Center linking configuration.
472- // Once a link is added, the data stream from Merchant Center to Cloud Retail
598+ // After a link is added, the data stream from Merchant Center to Cloud Retail
473599 // will be enabled automatically. The requester must have access to the
474- // merchant center account in order to make changes to this field.
600+ // Merchant Center account in order to make changes to this field.
475601 MerchantCenterLinkingConfig merchant_center_linking_config = 6 ;
476602}
0 commit comments