Google Cloud Retail V2 Client - Class BoostSpec (1.2.1)

Reference documentation and code samples for the Google Cloud Retail V2 Client class BoostSpec.

Boost specification to boost certain items.

Generated from protobuf message google.cloud.retail.v2.SearchRequest.BoostSpec

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ condition_boost_specs array<Google\Cloud\Retail\V2\SearchRequest\BoostSpec\ConditionBoostSpec>

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 20.

↳ skip_boost_spec_validation bool

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

getConditionBoostSpecs

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 20.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setConditionBoostSpecs

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 20.

Parameter
NameDescription
var array<Google\Cloud\Retail\V2\SearchRequest\BoostSpec\ConditionBoostSpec>
Returns
TypeDescription
$this

getSkipBoostSpecValidation

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

Returns
TypeDescription
bool

hasSkipBoostSpecValidation

clearSkipBoostSpecValidation

setSkipBoostSpecValidation

Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this