Class BoostSpec (0.4.2)

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

Boost specification to boost certain items. .. attribute:: condition_boost_specs

Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 10.

:type: Sequence[google.cloud.retail_v2.types.SearchRequest.BoostSpec.ConditionBoostSpec]

Classes

ConditionBoostSpec

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

Boost applies to products which match a condition. .. attribute:: condition

An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations.

Examples:

  • To boost products with product ID "product_1" or "product_2", and color "Red" or "Blue": ::

    (id: ANY("product_1", "product_2")) AND (colorFamilies: ANY("Red", "Blue"))

    :type: str