# ElasticSearch cluster behavior - Define all nodes to update together

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613>\
**Category:** Elasticsearch\
**Created:** [November 15, 2015, 10:23am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613 "2015-11-15T10:23:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stam585](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stam585](https://discuss.elastic.co/u/stam585)\
**Post date:** [November 15, 2015, 10:23am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613/1 "2015-11-15T10:23:22Z")

</div>

Hi,

After I insert a document to ElasticSearch I immediately go and retrieve it with a query.  
I am polling the request several times so if it isn't completely indexed it will return in the second or third try.

Sometimes,  
in a clustered environment, I have noticed that I can get the request and a milisecond later the same request is returned empty.

I assume that it goes to another node in the cluster - that is not yet indexed.

If this is it, I really need to define the cluster to return a value only after all nodes are updated with it.

1. Was what I described true? Is it possible that not all nodes are updated together?
2. Is it a cluster configuration issue ? Is it solvable with configuration?

Thanks.

---

<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:** [November 15, 2015, 11:05am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613/2 "2015-11-15T11:05:07Z")

</div>

You need to refresh the index. By default new data are available for searching only after 1s.

Note: don't do that in prod.

---

<div class="post-metadata">

**Author:** ![stam585](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@stam585](https://discuss.elastic.co/u/stam585)\
**Post date:** [November 16, 2015, 11:39am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613/3 "2015-11-16T11:39:17Z")

</div>

Ok,  
It seems weird to me.

Does anyone has a link that descibes this behaviour?  
I would have expected the cluster to send index it, save it to all nodes and then return a similiar answer to all requests.

---

<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:38pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-behavior-define-all-nodes-to-update-together/34613/4 "2017-07-05T23:38:12Z")

</div>


