title: Sorting and latest records in ElasticSearch
body: <p>I've two questions related to ElasticSearch.</p>
  
  <p>1) Is there any way to specify that I want results with specific field sorted in descending order?
  An equivalt SQL query will be: </p>
  
  <pre><code>select * from table1 where a="b" order by myprimarykey desc;
  </code></pre>
  
  <p>2) How to get first and last(latest) record?</p>