title: How do I do a not exists query for an attribute in elasticsearch?
body: <p>I have objects with dynamic fields in Elasticsearch that looks like this:</p>
  
  <pre><code>{
    "_id": 1,
    "fields": [
      {
        "identifier": "product",
        "value": "Google Home"
      },
      {
        "identifer": "currency",
        "value": "bitcoin"
      }
    ]
  },
  {
    "_id": 2,
    "fields": [
      {
        "identifier": "product",
        "value": "Alexa"
      },
      {
        "identifer": "currency",
        "value": "INR"
      }
    ]
  },
  {
     "_id": 3,
    "fields": [
      {
        "identifer": "currency",
        "value": "USD"
      }
    ]
  }
  </code></pre>
  
  <p>How can I write a query that will fetch the objects that DO NOT have a certain field value, i.e. I want to be able to search for all records that don't have a specific product associated with them.
  Let's say I want to search all items that don't have the product "Google Home". It should return only the 2nd and 3rd items.</p>