title: elasticsearch: how to sort by list of tags and a numeric field
body: <p>I have 3 documents in a mapping look like this</p>
  
  <p>{
  "tags":["a"],
  "count":10
  }<br>
  {
  "tags":["a","b","c"],
  "count":50
  }<br>
  {
  "tags":["a","c"],
  "count":100
  }<br></p>
  
  <p>When I search by tags, say, 
  {"should":["tags":"a", "tags":"b"]}</p>
  
  <p>Want the result to be sorted by number of tag match, then by count desc, like this:</p>
  
  <p>{
  "tags":["a","b","c"],
  "count":50
  }<br>
  {
  "tags":["a","c"],
  "count":100
  }<br>
  {
  "tags":["a"],
  "count":10
  }<br></p>
  
  <p>How can I achieve this? I tried sort [_score, {"count":"desc"}], however, because of the score values are all different, the {"count":"desc"} part never worked.</p>
  
  <p>Any help is appreciated. Thanks.</p>