Initial work on sort_by support in ES