# Google Cloud Vector Search V1 Client - Class SearchResult (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 SearchResult.

A single search result.

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

## Namespace

Google \\ Cloud \\ VectorSearch \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ data_object` | `https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.DataObject` Output only. The matching data object. |
| `↳ distance` | `float` Output only. Similarity distance or ranker score returned by BatchSearchDataObjects. |

### getDataObject

Output only. The matching data object.

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

### hasDataObject

### clearDataObject

### setDataObject

Output only. The matching data object.

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

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

### getDistance

Output only. Similarity distance or ranker score returned by
BatchSearchDataObjects.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasDistance

### clearDistance

### setDistance

Output only. Similarity distance or ranker score returned by
BatchSearchDataObjects.

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

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