title: Find empty strings in elasticsearch
body: <p>I'm trying to <code>_search</code> documents that has some specific value in the field.</p>
  
  <pre><code>{
    "query": {
        "bool": {
          "must": [
           {"field": {"advs.status": "warn"}}
         ]
        }
    }
  }
  </code></pre>
  
  <p>That works find. But when I'm trying to find documents that has empty string in that field, I get this error:</p>
  
  <pre><code>ParseException[Cannot parse '' ...
  </code></pre>
  
  <p>and then - long list of what was expected instead of empty string.</p>
  
  <p>I try this query:</p>
  
  <pre><code>{
    "query": { 
      "bool": {
          "must": [
              {"term": {"advs.status": ""}}
           ]
          }
    }
  }
  </code></pre>
  
  <p>It doesn't fails but finds nothing. It works for non empty strings instead. How am I supposed to do this?</p>
  
  <p>My mapping for this type looks exactly like this:</p>
  
  <pre><code>{
      "reports": {
          "dynamic": "false",
          "_ttl": {
              "enabled": true,
              "default": 7776000000
          },
          "properties": {
              "@fields": {
                  "dynamic": "true",
                  "properties": {
                      "upstream_status": {
                          "type": "string"
                      }
                  }
              },
              "advs": {
                  "properties": {
                      "status": {
                          "type": "string",
                          "store": "yes"
                      }
                  }
              },
              "advs.status": {
                  "type": "string",
                  "store": "yes"
              }
          }
      }
  }
  </code></pre>