Returns documents that contain an indexed value for a field.
An indexed value may not exist for a documentâs field due to a variety of reasons:
null
or []
"index" : false
and "doc_values" : false
set in the mappingignore_above
setting in the mappingignore_malformed
was defined in the mappingGET /_search
{ "query": { "exists": { "field": "user" } } }
field
(Required, string) Name of the field you wish to search.
While a field is deemed non-existent if the JSON value is null
or []
, these values will indicate the field does exist:
""
or "-"
null
and another value, such as [null, "foo"]
null-value
, defined in field mappingTo find documents that are missing an indexed value for a field, use the must_not
boolean query with the exists
query.
The following search returns documents that are missing an indexed value for the user.id
field.
GET /_search
{ "query": { "bool": { "must_not": { "exists": { "field": "user.id" } } } } }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4