Class FacetConfig (1.21.0)

FacetConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Possible options for the facet that corresponds to the current attribute config.

Attributes

Name Description
facet_intervals MutableSequence[google.cloud.retail_v2beta.types.Interval]
If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.
ignored_facet_values MutableSequence[google.cloud.retail_v2beta.types.CatalogAttribute.FacetConfig.IgnoredFacetValues]
Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.
merged_facet_values MutableSequence[google.cloud.retail_v2beta.types.CatalogAttribute.FacetConfig.MergedFacetValue]
Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if "dark_blue" merged into "BLUE", then the latter can't merge into "blues" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.
merged_facet google.cloud.retail_v2beta.types.CatalogAttribute.FacetConfig.MergedFacet
Use this field only if you want to merge a facet key into another facet key.
rerank_config google.cloud.retail_v2beta.types.CatalogAttribute.FacetConfig.RerankConfig
Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys.

Classes

IgnoredFacetValues

IgnoredFacetValues(mapping=None, *, ignore_unknown_fields=False, **kwargs)

[Facet values][google.cloud.retail.v2beta.SearchResponse.Facet.values] to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.

MergedFacet

MergedFacet(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The current facet key (i.e. attribute config) maps into the merged_facet_key. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).

MergedFacetValue

MergedFacetValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute. This feature is available only for textual custom attributes.

RerankConfig

RerankConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).