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