# Interface TextSearchOrBuilder (0.15.0)

0.15.0 (latest) 0.12.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.1.0

    public interface TextSearchOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getDataFieldNames(int index)

    public abstract String getDataFieldNames(int index)

Required. The data field names to search.

`repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The dataFieldNames at the given index. |

### getDataFieldNamesBytes(int index)

    public abstract ByteString getDataFieldNamesBytes(int index)

Required. The data field names to search.

`repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the dataFieldNames at the given index. |

### getDataFieldNamesCount()

    public abstract int getDataFieldNamesCount()

Required. The data field names to search.

`repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of dataFieldNames. |

### getDataFieldNamesList()

    public abstract List<String> getDataFieldNamesList()

Required. The data field names to search.

`repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the dataFieldNames. |

### getFilter()

    public abstract Struct getFilter()

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

`.google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Struct.html` | The filter. |

### getFilterOrBuilder()

    public abstract StructOrBuilder getFilterOrBuilder()

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

`.google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.StructOrBuilder.html` |   |

### getOutputFields()

    public abstract OutputFields getOutputFields()

Optional. The fields to return in the search results.

`
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.OutputFields` | The outputFields. |

### getOutputFieldsOrBuilder()

    public abstract OutputFieldsOrBuilder getOutputFieldsOrBuilder()

Optional. The fields to return in the search results.

`
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vectorsearch/latest/com.google.cloud.vectorsearch.v1beta.OutputFieldsOrBuilder` |   |

### getSearchText()

    public abstract String getSearchText()

Required. The query text.

`string search_text = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The searchText. |

### getSearchTextBytes()

    public abstract ByteString getSearchTextBytes()

Required. The query text.

`string search_text = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for searchText. |

### getTopK()

    public abstract int getTopK()

Optional. The number of results to return.

`optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The topK. |

### hasFilter()

    public abstract boolean hasFilter()

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

`.google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the filter field is set. |

### hasOutputFields()

    public abstract boolean hasOutputFields()

Optional. The fields to return in the search results.

`
.google.cloud.vectorsearch.v1beta.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the outputFields field is set. |

### hasTopK()

    public abstract boolean hasTopK()

Optional. The number of results to return.

`optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the topK field is set. |