[source, ruby]
----
response = client.search(
  body: {
    sort: [
      {
        _geo_distance: {
          'pin.location' => 'POINT (-70 40)',
          order: 'asc',
          unit: 'km'
        }
      }
    ],
    query: {
      term: {
        user: 'kimchy'
      }
    }
  }
)
puts response
----
