"sort":[{"source":"haversin(40.7143528,-74.0059731,lat_double,lon_double)","bindings":["lat_double","lon_double"]]

add sort support, using regular numeric fields/_score/_doc or Lucene's javascript compiled Expressions
(http://lucene.apache.org/core/4_8_0/expressions/org/apache/lucene/expressions/Expression.html)

for example:
"sort":["some_field_float",
        {"field":"some_other_field_integer","order":"asc"},
        {"source":"sqrt(_score) + ln(popularity_double)","bindings":["popularity_double"]}]