# GET Request to for the most recent event always returning the same thing

**URL:** <https://discuss.elastic.co/t/get-request-to-for-the-most-recent-event-always-returning-the-same-thing/73061>\
**Category:** Elasticsearch\
**Created:** [January 27, 2017, 8:40pm UTC](https://discuss.elastic.co/t/get-request-to-for-the-most-recent-event-always-returning-the-same-thing/73061 "2017-01-27T20:40:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Hoffman](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Ben\_Hoffman](https://discuss.elastic.co/u/Ben_Hoffman)\
**Post date:** [January 27, 2017, 8:40pm UTC](https://discuss.elastic.co/t/get-request-to-for-the-most-recent-event-always-returning-the-same-thing/73061/1 "2017-01-27T20:40:08Z")

</div>

Hello there, I am having some trouble getting the most recent event from my GET request. Here is the curl that I am using:

> ```
> curl localhost:9200/packetbeat-2017.01.26/_search?pretty=true -d '
> 
> ```
> 
> {  
> "query": {  
> "match\_all": {}  
> },  
> "size": 1,  
> "sort": [{  
> "@timestamp": {  
> "order": "desc"  
> }  
> }]  
> }

SOLVED: I needed an '@' symbol instead of an "\_" in from of the "timestamp" field.

This ALWAYS returns the same thing. I also tried in ascending order, and I really don't know what the deal with this is. All that I want is the info from the most recent event to happen. Please help me out

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 29, 2017, 4:14am UTC](https://discuss.elastic.co/t/get-request-to-for-the-most-recent-event-always-returning-the-same-thing/73061/2 "2017-01-29T04:14:09Z")

</div>

> [@Ben\_Hoffman](#):
>
> This ALWAYS returns the same thing

What do you mean by this? What does it return?

---

<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:** [February 26, 2017, 4:14am UTC](https://discuss.elastic.co/t/get-request-to-for-the-most-recent-event-always-returning-the-same-thing/73061/3 "2017-02-26T04:14:14Z")

</div>

Closed on February 26, 2017, 4:14am UTC

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