[source, ruby]
----
response = client.search(
  index: 'my_locations',
  body: {
    size: 0,
    aggregations: {
      grouped: {
        geotile_grid: {
          field: 'location',
          precision: 6
        }
      }
    }
  }
)
puts response
----
