1. Docs

Prefix Query

Returns documents that contain a specific prefix in a provided field. Requires the index_prefixes option to be enabled on the given field.

Parameters

  • field

    (Required, object) Field you wish to search. You can simplify the prefix query syntax by combining the field and value parameters.

  • value

    (Required, string) Beginning characters of terms you wish to find in the provided .

Example

JSON
{ "query": { "prefix": { "user.id": { "value": "ki" } } } }

Was this page helpful?