# Google Cloud Vector Search V1 Client - Class TextSearch (0.4.0)

0.4.0 (latest) 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vector Search V1 Client class TextSearch.

Defines a text search operation.

Generated from protobuf message `google.cloud.vectorsearch.v1.TextSearch`

## Namespace

Google \\ Cloud \\ VectorSearch \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ search_text` | `string` Required. The query text. |
| `↳ data_field_names` | `string[]` Required. The data field names to search. |
| `↳ output_fields` | `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.OutputFields` Optional. The fields to return in the search results. |
| `↳ top_k` | `int` Optional. The number of results to return. |
| `↳ filter` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, represented as a `google.protobuf.Struct`. |

### getSearchText

Required. The query text.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSearchText

Required. The query text.

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

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

### getDataFieldNames

Required. The data field names to search.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDataFieldNames

Required. The data field names to search.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

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

### getOutputFields

Optional. The fields to return in the search results.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.OutputFields|null` |   |

### hasOutputFields

### clearOutputFields

### setOutputFields

Optional. The fields to return in the search results.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.OutputFields` |

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

### getTopK

Optional. The number of results to return.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasTopK

### clearTopK

### setTopK

Optional. The number of results to return.

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

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

### getFilter

Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`,
represented as a `google.protobuf.Struct`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasFilter

### clearFilter

### setFilter

Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`,
represented as a `google.protobuf.Struct`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

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