Stale data until elasticsearch is restarted

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
{...}

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

Does it still do this if you use the index name rather than the alias? Have you tried doing a flush?

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

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

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