# Periodically run elasticsearch for new records since last run

**URL:** <https://discuss.elastic.co/t/periodically-run-elasticsearch-for-new-records-since-last-run/88700>\
**Category:** Logstash\
**Created:** [June 8, 2017, 10:35am UTC](https://discuss.elastic.co/t/periodically-run-elasticsearch-for-new-records-since-last-run/88700 "2017-06-08T10:35:46Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Exocomp](https://avatars.discourse-cdn.com/v4/letter/e/ea5d25/32.png) [@Exocomp](https://discuss.elastic.co/u/Exocomp)\
**Post date:** [June 27, 2017, 11:27am UTC](https://discuss.elastic.co/t/periodically-run-elasticsearch-for-new-records-since-last-run/88700/6 "2017-06-27T11:27:14Z")

</div>

Agreed time stamp alone is not going to work. Currently I'm not using a message queue, it seems a bit much right now to add one to resolve this scenario. If one was in place already I would have pursued it though.

Is it possible to setup ES with an auto increment field on insert? If that were possible I could then query on it to find new records. If that is not possible then I need a way from logstash generate an auto increment and send to ES to later query on.

Thanks,  
E

---

_[View the full topic](https://discuss.elastic.co/t/periodically-run-elasticsearch-for-new-records-since-last-run/88700)._
