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

The specification for query spell correction.

Generated from protobuf message `google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec`

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ mode` | `int` The mode under which spell correction should take effect to replace the original search query. Default to [Mode.AUTO](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.SpellCorrectionSpec.Mode#_Google_Cloud_Retail_V2_SearchRequest_SpellCorrectionSpec_Mode__AUTO). |

### getMode

The mode under which spell correction should take effect to
replace the original search query. Default to
[Mode.AUTO](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.SpellCorrectionSpec.Mode#_Google_Cloud_Retail_V2_SearchRequest_SpellCorrectionSpec_Mode__AUTO).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Mode](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.SpellCorrectionSpec.Mode). |

### setMode

The mode under which spell correction should take effect to
replace the original search query. Default to
[Mode.AUTO](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.SpellCorrectionSpec.Mode#_Google_Cloud_Retail_V2_SearchRequest_SpellCorrectionSpec_Mode__AUTO).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Mode](https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.SpellCorrectionSpec.Mode). |

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