Sorting on multiple fields in tire elasticsearch
If you want to sort on multiple fields, list them in order like follows:
tire.search(options) do
query {string query_string}
sort {by [{:updated_at => 'desc'}, {:num_comments => 'desc'}]}
}
will return the most recent results with the most commented first.