Skip to content

Instantly share code, notes, and snippets.

@petrkohut
Created April 10, 2017 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrkohut/f4e9b758432392947bbe41dd5cdf32e0 to your computer and use it in GitHub Desktop.
Save petrkohut/f4e9b758432392947bbe41dd5cdf32e0 to your computer and use it in GitHub Desktop.
Elasticsearch query - how to search empy string

How to search empty string in Elasticsearch

{
  "query": {
    "filtered": {
      "filter": {
        "not": {
          "filter": {
            "range": {
              "yourFieldName": {}
            }
          }
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment