# In-memory buffer?

**URL:** <https://discuss.elastic.co/t/in-memory-buffer/110611>\
**Category:** Elasticsearch\
**Created:** [December 7, 2017, 5:35am UTC](https://discuss.elastic.co/t/in-memory-buffer/110611 "2017-12-07T05:35:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [December 8, 2017, 11:22am UTC](https://discuss.elastic.co/t/in-memory-buffer/110611/2 "2017-12-08T11:22:54Z")

</div>

When new documents are indexed into Lucene, for efficiency they are written to an in-memory buffer instead of being immediately written to disk. This in-memory buffer will be flushed in a few circumstances and creates a new segment on disk:

- after a refresh
- after a flush
- if the in-memory buffer fills up

---

_[View the full topic](https://discuss.elastic.co/t/in-memory-buffer/110611)._
