title: Elasticsearch multi search API
body: <p>I'm trying to perform multiple concurrent search requests using Elasticsearch (version 6). Here is my queries file:</p>
  
  <pre><code>{"index" : "web"}
  {"max_concurrent_searches": 64, "query": {"match": {"content": "school"}}}
  {"index" : "web"}
  {"max_concurrent_searches": 64, "query": {"match": {"content": "car"}}}
  {"index" : "web"}
  {"max_concurrent_searches": 64, "query": {"match": {"content": "cat"}}}
  </code></pre>
  
  <p>Here is the command I use to issue the bulk request:</p>
  
  <pre><code>curl -H "Content-Type: application/x-ndjson" -XGET ''$url'/_msearch'
  --data-binary "@$file"; echo
  </code></pre>
  
  <p>However, I get the following error indicating my wrong usage of <code>max_concurrent_searches</code> parameter.</p>
  
  <pre><code>{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a VALUE_NUMBER in [max_concurrent_searches].","line":1,"col":29}],"type":"parsing_exception","reason":"Unknown key for a VALUE_NUMBER in [max_concurrent_searches].","line":1,"col":29},"status":400}
  </code></pre>
  
  <p>If I removed <code>"max_concurrent_searches": 64,</code> from the queries file above, everything works just perfect.</p>
  
  <p>I want to know how can I use/set the <code>max_concurrent_searches</code> parameter, I couldn't find useful information in <a href="https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html" rel="nofollow noreferrer">Elasticsearch documentation</a> about this except the following:</p>
  
  <blockquote>
    <p>The msearch’s max_concurrent_searches request parameter can be used to
    control the maximum number of concurrent searches the multi search api
    will execute. This default is based on the number of data nodes and
    the default search thread pool size.</p>
  </blockquote>