title: ElasticSearch : Query multiple value in array
body: <p>I am trying to put together a query/filter for elastic search. Here is what the structure look like</p>
  
  <pre><code>{
     _id:"0872300234",
     customers:[
        {
           name:"bob",
           priority:1,
           type:"GoodUser"
        },
        {
           name:"dan",
           priority:10,
           type:"BadUser"
        },
        {
           name:"sam",
           priority:10,
           type:"GoodUser"
        },
        {
           name:"cam",
           priority:2,
           type:"BadUser"
        }
     ]
  }
  </code></pre>
  
  <p>So lets call this a "profile" document/record. I would like to find all the profiles that has a customer in that has a priority of 10 and is a "goodUser" (the same customer) so in the example sam will match but dan will not. I got a query that  gives me a profile where a customer has priority 10 and a customer(not the same one) has type GoodUser.</p>
  
  <p>Is there a way to query a array item as a whole.</p>
  
  <p>thanks</p>