# How can i get the latest indexed documents of an index

**URL:** https://discuss.elastic.co/t/how-can-i-get-the-latest-indexed-documents-of-an-index/34475
**Category:** Elasticsearch
**Created:** [November 12, 2015, 11:22pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-latest-indexed-documents-of-an-index/34475 "2015-11-12T23:22:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jupp](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jupp](https://discuss.elastic.co/u/jupp)
#### Post date: [November 12, 2015, 11:22pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-latest-indexed-documents-of-an-index/34475/1 "2015-11-12T23:22:56Z")

</div>

We ship events from logstash to elasticsearch.

i'm wondering how i can get the latest indexed documents of an index? A simple "get" and "sort by timestamp" is not possible. We overwrite the timestamp with the original timestamp of an event.

We see that some events are written in the index of the previous day, but that should not be, Now we want to find out what events they are.

---

<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 5, 2017, 11:38pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-latest-indexed-documents-of-an-index/34475/2 "2017-07-05T23:38:44Z")

</div>


