Modified to pull distance data out of the sort[] result based on the index of our order by, instead of just assuming it's the first entry.
Merge branch 'fix_elasticsearch_distance_results'
Updated version