# About the Wiriting Operation In ES

**URL:** <https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978>\
**Category:** Elasticsearch\
**Created:** [March 10, 2016, 5:24am UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978 "2016-03-10T05:24:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![whzcl](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@whzcl](https://discuss.elastic.co/u/whzcl)\
**Post date:** [March 10, 2016, 5:24am UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978/1 "2016-03-10T05:24:31Z")

</div>

Hi, I have two questions about the Writing Operation in ES.

Q1: I wonder whether I have understood the following descriptions correctly:  
When a writing operation returns successfully on a document, the changes will not be been until the refresh\_interval has passed. This is due the reason that when a writing operation to a document succeeds, the recent document will only be in the 'in-memory buffer'. And the document the 'in-memory buffer can't be searchable. After the 'refresh\_interval'(default 1 second) , this document in buffer are flushed to segments and the documents will then be searchable.

Q2: If I want to make document be searchable immediately right after the writing operation returns successfully, is there any way for ES to make it true? Just like using ES as a NoSql Document Databases.

I want to know something about the time when a writing operation will be

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 10, 2016, 6:19am UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978/2 "2016-03-10T06:19:16Z")

</div>

You can refresh the index to make your document searchable but don't do that on every request.

Note that all CRUD operations are real time.

Search is not.

---

<div class="post-metadata">

**Author:** ![whzcl](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@whzcl](https://discuss.elastic.co/u/whzcl)\
**Post date:** [March 10, 2016, 6:42am UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978/5 "2016-03-10T06:42:58Z")

</div>

Thank you.

I wonder what's the time of the Writing Operation returns successfully, is it just after the time that document has been written to an in-memory indexing buffer?

Can we alter the time of the Writing Operation returns successfully to the time that the document has been committed to segment?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [March 10, 2016, 11:54am UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978/6 "2016-03-10T11:54:07Z")

</div>

The write returns successfully when the translog has been synced to disk  
(default behavior in 2.x). There is a feature request called "block until  
refresh" that asks to add an option to index requests so that they will not  
return until after the document has been refreshed. It is pretty well  
stalled but I plan to pick it up sometime in the future. It might be a  
while though.

---

<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:09pm UTC](https://discuss.elastic.co/t/about-the-wiriting-operation-in-es/43978/7 "2017-07-05T23:09:32Z")

</div>


