Exists query

Exists query #

Returns documents that contain an indexed value for a specific field.

A document matches when the field has at least one non-null value — an empty string or an empty array does not count as existing.

Inside a nested query: supported — matches elements that carry the field.

Examples #

POST /my-collection/_search
{
  "query": {
    "exists": {
      "field": "user"
    }
  }
}

Parameters for exists #

  • field
    (Required, string) Field you wish to check for presence.
Calendar September 27, 2026
Edit Edit this page