SearchAsYouTypeSpec

Specification for search as you type in search requests.

JSON representation
{
  "condition": enum (Condition),
  "fields": [
    {
      object (Field)
    }
  ],
  "scoreThreshold": number
}
Fields
condition

enum (Condition)

The condition under which search as you type should occur. Default to Condition.DISABLED.

fields[]

object (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 Condition.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.