# TextSearch

Defines a text search operation.

| JSON representation |
|---|
| ``` { "searchText": string, "dataFieldNames": [ string ], "outputFields": { object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1/OutputFields`) }, "filter": { object }, "topK": integer } ``` |

| Fields ||
|---|---|
| `searchText` | `string` Required. The query text. |
| `dataFieldNames[]` | `string` Required. The data field names to search. |
| `outputFields` | ``object (`https://docs.cloud.google.com/gemini-enterprise-agent-platform/build/vector-search-2/reference/rest/v1/OutputFields`)`` Optional. The fields to return in the search results. |
| `filter` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, represented as a `google.protobuf.Struct`. |
| `topK` | `integer` Optional. The number of results to return. |