# Google Cloud Retail V2 Client - Class BoostSpec (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.1 2.1.3 2.0.0 1.7.0 1.6.4 1.5.0 1.4.2 1.3.1 1.2.1 1.1.1 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`

## Namespace

Google \\ Cloud \\ Retail \\ V2 \\ SearchRequest

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ condition_boost_specs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec.ConditionBoostSpec>` Condition boost specifications. If a product matches multiple conditions in the specifications, 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](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__) will be ignored and valid [BoostSpec.condition_boost_specs](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__) will still be applied. |

### getConditionBoostSpecs

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec.ConditionBoostSpec>` |   |

### setConditionBoostSpecs

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec.ConditionBoostSpec>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSkipBoostSpecValidation

Whether to skip boostspec validation. If this field is set to true,
invalid
[BoostSpec.condition_boost_specs](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__)
will be ignored and valid
[BoostSpec.condition_boost_specs](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__)
will still be applied.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSkipBoostSpecValidation

### clearSkipBoostSpecValidation

### setSkipBoostSpecValidation

Whether to skip boostspec validation. If this field is set to true,
invalid
[BoostSpec.condition_boost_specs](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__)
will be ignored and valid
[BoostSpec.condition_boost_specs](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.BoostSpec#_Google_Cloud_Retail_V2_SearchRequest_BoostSpec__getConditionBoostSpecs__)
will still be applied.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |