Exists

Exists query

/ 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.

How it works #

exists never touches the inverted index. It is answered from the stored-field / column layer, where every document either carries the key or does not:

...