title: Best way to check if a field exist in an Elasticsearch document
body: <p>What is the best way to check if a field of a document in elasticsearch exists? I can't find anything in the documentation.</p>
  <p>For example if this document doesn't have the field/key &quot;price&quot; I don't want to return in the result.</p>
  <pre><code>{
      &quot;updated&quot;: &quot;2015/09/17 11:27:27&quot;,
       &quot;name&quot;: &quot;Eye Shadow&quot;,
       &quot;format&quot;: &quot;1.5 g / 0.05 oz&quot;,
  }
  </code></pre>
  <p>What I can do?</p>