title: ElasticSearch, how to search for a document containing a specific array element
body: <p>I am having a little problem with elasticsearch and wonder if someone can help me solve it.</p>
  
  <p>I have a document containing an array of tuples (publications).</p>
  
  <p>Something like :</p>
  
  <pre><code>    {
         ....
  
         publications: [
           {
             item1: 385294,
             item2: 11
           },
           {
             item1: 395078,
             item2: 1
           }
         ]
  
         ....
      }
  </code></pre>
  
  <p>The problem i have is for retrieving documents who contain a specific tuple, for exemple (item1 = 395078 AND item2 = 1).</p>
  
  <p>Whatever i try, it seems to always treat item1 and item2 separately, i fail to tell elasticsearch that item1 and item2 must have a specific value inside the same tuple, not accross the whole array...</p>
  
  <p>Is there something i'm missing here ?</p>
  
  <p>Thanks</p>