Google Cloud Retail V2 Client - Class BoostSpec (1.0.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.

Generated from protobuf field repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

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.

Generated from protobuf field repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec condition_boost_specs = 1;

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.

Generated from protobuf field optional bool skip_boost_spec_validation = 2;

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.

Generated from protobuf field optional bool skip_boost_spec_validation = 2;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this