- [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#SCHEMA_REPRESENTATION)
- [Condition](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Condition)
- [Field](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Field)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Field.SCHEMA_REPRESENTATION)

Specification for search as you type in search requests.

| JSON representation |
|---|
| ``` { "condition": enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Condition`), "fields": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Field`) } ], "scoreThreshold": number } ``` |

| Fields ||
|---|---|
| `condition` | ``enum (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Condition`)`` The condition under which search as you type should occur. Default to `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Condition.ENUM_VALUES.DISABLED`. |
| `fields[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Field`)`` Optional. The list of fields to be used for Search As You type scoring. |
| `scoreThreshold` | `number` Optional. Search As You type score threshold for filtering purpose. We keep the result if `score` \>= `scoreThreshold`. |

## Condition

Enum describing under which condition search as you type should occur.

| Enums ||
|---|---|
| `CONDITION_UNSPECIFIED` | Server behavior defaults to `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/SearchAsYouTypeSpec#Condition.ENUM_VALUES.DISABLED`. |
| `DISABLED` | Disables Search As You Type. |
| `ENABLED` | Enables Search As You Type. |
| `AUTO` | Automatic switching between search-as-you-type and standard search modes, ideal for single-API implementations (e.g., debouncing). |

## Field

A schema field to be used for Search As You type scoring on this request. Overrides any data-store-level Search As You type field configuration for the duration of the request.

| JSON representation |
|---|
| ``` { "key": string, "weight": number } ``` |

| Fields ||
|---|---|
| `key` | `string` Required. A field key that has been indexed for Search As You type. |
| `weight` | `number` Optional. weight for scores from this field. Defaults to 1.0 if not specified. |