# Stale data until elasticsearch is restarted

**URL:** <https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480>\
**Category:** Elasticsearch\
**Created:** [April 7, 2021, 2:12pm UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480 "2021-04-07T14:12:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwxr\_xr\_x](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rwxr_xr_x/32/45812_2.png) [@rwxr\_xr\_x](https://discuss.elastic.co/u/rwxr_xr_x)\
**Post date:** [April 7, 2021, 2:12pm UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480/1 "2021-04-07T14:12:23Z")

</div>

Hello,

I can't seem to find any posts about this. I have a cluster with one node, with "cluster health: yellow (60 of 115)".

I'm using ES 7.10.2

From an application I send:  
POST [http://ESURL/ALIAS\_NAME/\_doc/OBJECT\_ID](http://ESURL/ALIAS_NAME/_doc/OBJECT_ID)  
{...}

get back:

HTTP Response Code 200  
with the Body:  
`{"_index":"INDEX_NAME","_type":"_doc","_id":"OBJECT_ID","_version":21,"result":"updated","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":70,"_primary_term":4}`

The "\_version" field increments after each and every update.

But if I do a:

`curl --header "Content-Type: application/json" --request POST --data "{\"query\":{\"match\":{\"id\":OBJECT_ID}}}" http://ALIAS_NAME/_search`

I'm getting slated data. If I restart ES the correct data is returned.

Anybody has any recommendations? I don't see any errors or warnings in the logs.

Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 7, 2021, 10:05pm UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480/2 "2021-04-07T22:05:30Z")

</div>

Does it still do this if you use the index name rather than the alias? Have you tried doing a [flush](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html)?

---

<div class="post-metadata">

**Author:** ![rwxr\_xr\_x](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rwxr_xr_x/32/45812_2.png) [@rwxr\_xr\_x](https://discuss.elastic.co/u/rwxr_xr_x)\
**Post date:** [April 8, 2021, 3:33pm UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480/3 "2021-04-08T15:33:17Z")

</div>

I tried with index name as well - same outcome.  
I also tried to "POST /\_flush" and "POST INDEX\_NAME/\_flush" - same outcome.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 12, 2021, 12:24am UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480/4 "2021-04-12T00:24:16Z")

</div>

Can you provide a complete reproduction using curl/Dev tools?

---

<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:** [May 10, 2021, 12:25am UTC](https://discuss.elastic.co/t/stale-data-until-elasticsearch-is-restarted/269480/5 "2021-05-10T00:25:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
