# Send bucket documets results

**URL:** <https://discuss.elastic.co/t/send-bucket-documets-results/187308>\
**Category:** Elasticsearch\
**Created:** [June 25, 2019, 10:56am UTC](https://discuss.elastic.co/t/send-bucket-documets-results/187308 "2019-06-25T10:56:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Zhilko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexander_zhilko/32/43241_2.png) [@Alexander\_Zhilko](https://discuss.elastic.co/u/Alexander_Zhilko)\
**Post date:** [June 25, 2019, 10:56am UTC](https://discuss.elastic.co/t/send-bucket-documets-results/187308/1 "2019-06-25T10:56:45Z")

</div>

i trying to make aggregation for buckets  
so i did

"aggs": {  
"name": {  
"terms": {  
"field": "client.name"  
}  
}

```
  }

```

and the response is  
key : name1  
doc count  
key name 2  
doc count

i need different response i have the name and i have lat lon location on map.

i want to get in response :  
name1  
lat  
lon  
name 2  
lat lon  
name 3  
lat lon.

now i want to have only the most recent lat lon per name .  
i couldn't figure it out how to do it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 23, 2019, 10:56am UTC](https://discuss.elastic.co/t/send-bucket-documets-results/187308/2 "2019-07-23T10:56:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
