In our application, we are updating more than one document at a time for a index_x. When queried for updated documents, it does not return updated data for few document, immediately. e.g. If I am updating 10 documents, 1 document update is not retrieved immediately but after 10 to 15 mins. It has been observed that, the missed data is updated after 10 or 15 mins. For index_x, we have set refresh parameter as default i.e. 1s
Below are the app configurations for app:
- JAVA: 11
- Spring Boot: 2.7.11
- Spring Data Elasticsearch: 4.2.12
- Elasticsearch client - 7.12.1
- Elasticsearch version on AWS - 7.7
I have gone through the documentations and post like Elastic Search GET doesn't give latest document, where it says we can use refresh parameter to get the correct result. In Application, we are using JAVA API to save and retrieve the documents. From 4.2 onwards, refresh option is not available for Elasticsearch repository, it is explicitly included when we perform update or save operations.
If the ES is explicitly refreshing the documents, why I am not getting the updated data when queried for the same. And why only for few documents?
UPDATED: I observed that though I have sent the query to update document, it has not updated till next day also. I checked in Kibana as well. It returns old data.