title: Elasticsearch - sort multi-index query
body: <p>I'm building an autocomplete search with elasticsearch so I need to query 3 indexes <code>posts</code>, <code>comments</code>, <code>authors</code>. I have the following query:</p>
  
  <pre><code>{
     "query":{
        "query_string":{
           "query":"something"
        }
     }
  }
  </code></pre>
  
  <p>the call:</p>
  
  <pre><code>curl -X GET 'http://localhost:9200/posts,comments,authors/_search?pretty' -d '{
    "query": {
      "query_string": {
        "query": "something"
      }
    }
  }'
  </code></pre>
  
  <p>I need to sort the results by specific index fields, for example:</p>
  
  <p>posts index has a field called <code>comments_count</code>, comments <code>votes_count</code> and authors <code>posts_count</code>. When comparing posts, then it should sort by <code>comments_count</code>, when comments then <code>votes_count</code>, when authors then <code>posts_count</code>.</p>
  
  <p>It's possible to do something like that? I wouldn't like to merge the indexes into one because they indexes completely different documents.</p>