title: Combine two queries in one request
body: <p>I want to execute multiple queries on elasticsearch server with one request. Specifically I have the following query (is on elastcisearch-php-client)</p>
  
  <pre><code>$params = [
                      "index" =&gt; "bookydate",
                      "type" =&gt; "vendor_service",
                      "body" =&gt; [
                          "query" =&gt; [
                              "bool" =&gt; [
                                  "must" =&gt; [
                                      "term" =&gt; [
                                          "sys_service_id" =&gt; $request-&gt;input("sys_service_id")
                                      ]
                                  ],
                                  "should" =&gt; [ 
                                      "geo_shape" =&gt; [
                                          "served_location" =&gt; [
                                              "shape" =&gt; [
                                                  "type" =&gt; "point",
                                                  "coordinates" =&gt; [
                                                      "{$request-&gt;input('loc_lon')}",
                                                      "{$request-&gt;input('loc_lat')}"]
                                              ]
                                          ]
                                      ]
                                  ]
                              ]
                          ]
                      ]
                  ];
  </code></pre>
  
  <p>What I want to do is the fetch also all the documents that have the <code>"hole_country"</code> field to <code>true</code>. </p>
  
  <p>What I have tried already is to make another request to Elasticsearch server and with <code>array_merge</code> combine the two results, but did not work because of PHP restrictions on arrays with multiple same keys.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Elastcisearch supports a feature called <code>Multisearch</code> that is exactly what im looking for. The problem is that php-client does not support multisearch so I have to use Guzzle in order to send the requests. </p>
  
  <p>Guzzle docs does not have a full info about how to construct a correct request body. Any info is welcome</p>
  
  <p>Already i have the following body but elastcisearch is returing bad request error</p>
  
  <pre><code>    $body = [
          ["index"=&gt;"bookydate"],
          ["query"=&gt;["bool"=&gt; ["must"=&gt;[["term"=&gt;["sys_service_id"=&gt;"1"]],["geo_shape"=&gt;["served_location"=&gt;["shape"=&gt;["type"=&gt;"circle","coordinates"=&gt;[25,3],"radius"=&gt;"90km"]]]]]]]],
          ["index"=&gt;"bookydate"],
          ["query"=&gt;["bool"=&gt;["must"=&gt;["term"=&gt;["hole_country"=&gt;true]]]]]
      ];
  </code></pre>