title: ElasticSearch match combination in array
body: <p>I'm implementing ElasticSearch into my Laravel application using the php package from ElasticSearch.</p>
  
  <p>My application is a small jobboard and currently my job document is looking like this:</p>
  
  <pre><code>{  
     "_index":"jobs",
     "_type":"job",
     "_id":"19",
     "_score":1,
     "_source":{  
        "0":"",
        "name":"Programmer",
        "description":"This is my first job! :)",
        "text":"Programming is awesome",
        "networks":[  
           {  
              "id":1,
              "status":"PRODUCTION",
              "start":"2015-02-26",
              "end":"2015-02-26"
           },
           {  
              "id":2,
              "status":"PAUSE",
              "start":"2015-02-26",
              "end":"2015-02-26"
           }
        ]
     }
  }
  </code></pre>
  
  <p>As you can see a job can be attached to multiple networks. In my search query I would like to include <code>WHERE network.id == 1 AND network.status == PRODUCTION.</code></p>
  
  <p>My current query looks like this, however this returns documents where it has a network of id 1, if it has any network of status PRODUCTION. Is there anyway i can enforce both to be true within one network?</p>
  
  <pre><code>$query = [
              'index' =&gt; $this-&gt;index,
              'type' =&gt; $this-&gt;type,
              'body' =&gt; [
                  'query' =&gt; [
                      'bool' =&gt; [
                          'must' =&gt; [
                              ['networks.id' =&gt; 1]],
                              ['networks.status' =&gt; 'PRODUCTION']]
                          ],
                          'should' =&gt; [
                              ['match' =&gt; ['name' =&gt; $query]],
                              ['match' =&gt; ['text' =&gt; $query]],
                              ['match' =&gt; ['description' =&gt; $query]],
                          ],
                      ],
                  ],
              ],
          ];
  </code></pre>