A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-exists-query below:

Exists query | Reference

Exists query

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:

 GET /_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:

To 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