# Best Practice for Pulling results off a rapidly growing index

**URL:** <https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224>\
**Category:** Elasticsearch\
**Created:** [July 24, 2016, 5:30am UTC](https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224 "2016-07-24T05:30:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geremy\_Cohen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geremy_cohen/32/11037_2.png) [@Geremy\_Cohen](https://discuss.elastic.co/u/Geremy_Cohen)\
**Post date:** [July 24, 2016, 5:30am UTC](https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224/1 "2016-07-24T05:30:38Z")

</div>

I am trying to keep a UI Table up-to-date with records that are in a certain index, displaying oldest first, newest last.

A new record is added to the index ever 1-2 seconds.

What is the best way to page or scroll as to keep the UI updated?

I have the idea to try to use the Scroll API, but I'm not sure if more records are added to the index between successive scroll\_id requests, if the server will adjust to be sure I get every last record added since the initial request, or, if I will only get (scroll) up to the last record that was present when the initial scroll request was issued.

Thanks in advance for the help.

---

<div class="post-metadata">

**Author:** ![DiscussBuster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/discussbuster/32/11042_2.png) [@DiscussBuster](https://discuss.elastic.co/u/DiscussBuster)\
**Post date:** [July 25, 2016, 12:43am UTC](https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224/2 "2016-07-25T00:43:50Z")

</div>

> What is the best way to page or scroll as to keep the UI updated?

There isn't. The search results are isolated, whether you are paging or scrolling.

It sounds like you want some kind of pub-sub functionality. Elasticsearch doesn't work this way.

The closest thing I can think of would be for something in your platform to handle both searches and indexing, so that it could create a percolator for every search, percolate every indexed document, and update the appropriate UI clients based on the results of the percolation.

---

<div class="post-metadata">

**Author:** ![Geremy\_Cohen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geremy_cohen/32/11037_2.png) [@Geremy\_Cohen](https://discuss.elastic.co/u/Geremy_Cohen)\
**Post date:** [July 25, 2016, 3:46am UTC](https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224/3 "2016-07-25T03:46:37Z")

</div>

Thanks for the reply! I know exactly how I'd do it in a pub/sub paradigm,  
was just hoping I could skip that layer if there was similar functionality  
native. Thanks for the help!

---

<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, 10:33pm UTC](https://discuss.elastic.co/t/best-practice-for-pulling-results-off-a-rapidly-growing-index/56224/4 "2017-07-05T22:33:16Z")

</div>


