# What is a transaction during the indexing request to E.S ? What is the transaction during the search query request to E.S?

**URL:** <https://discuss.elastic.co/t/what-is-a-transaction-during-the-indexing-request-to-e-s-what-is-the-transaction-during-the-search-query-request-to-e-s/15736>\
**Category:** Elasticsearch\
**Created:** [February 11, 2014, 5:43pm UTC](https://discuss.elastic.co/t/what-is-a-transaction-during-the-indexing-request-to-e-s-what-is-the-transaction-during-the-search-query-request-to-e-s/15736 "2014-02-11T17:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adiworkoholic](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@adiworkoholic](https://discuss.elastic.co/u/adiworkoholic)\
**Post date:** [February 11, 2014, 5:43pm UTC](https://discuss.elastic.co/t/what-is-a-transaction-during-the-indexing-request-to-e-s-what-is-the-transaction-during-the-search-query-request-to-e-s/15736/1 "2014-02-11T17:43:13Z")

</div>

When we are indexing some data into E.S using some java client.

When I make an indexing request to E.S using a method call, the control goes to the E.S client node which would make a index request to ElasticSearch Cluster. I believe when this happens the data to be indexed would be written into memory and then finally persisted to the file system as the index files

What I want to know is when the indexing request is sent, when would the control return back to the java caller ?

Would it be after it is written to the memory

OR

Would it be after it is written to the index files.

Another question :  
During Search, what happens as part of a transaction ?

---

<div class="post-metadata">

**Author:** ![adiworkoholic](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@adiworkoholic](https://discuss.elastic.co/u/adiworkoholic)\
**Post date:** [February 13, 2014, 2:46pm UTC](https://discuss.elastic.co/t/what-is-a-transaction-during-the-indexing-request-to-e-s-what-is-the-transaction-during-the-search-query-request-to-e-s/15736/2 "2014-02-13T14:46:57Z")

</div>

Can someone please help me with understanding this ?

---

<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 6, 2017, 1:50am UTC](https://discuss.elastic.co/t/what-is-a-transaction-during-the-indexing-request-to-e-s-what-is-the-transaction-during-the-search-query-request-to-e-s/15736/3 "2017-07-06T01:50:29Z")

</div>

Closed on July 6, 2017, 1:50am UTC


