This is a query regarding data synchronization in elasticsearch.
We encountered a problem where we insert some data into elasticsearch at a regular interval. Now, immediately after data insertion, we run a search query for that particular data but the search query fails to find it even when the data is visible on kibana dashboard. The same query, when ran after a minute or so, is able to find the data.
I am not sure, but maybe this is because of data synchronization takes some time?If yes, is there any parameter that could be set/unset to reduce data synchronization time?
If no, what can we do in order to succefully be able to run search query?
"the search query fails to find it even when the data is visible on kibana dashboard"
But refresh_interval makes no sense when Kibana shows it. But be SURE you see it in Kibana and not just some similar data, as I've made this mistake.
No way Kibana can show the data unless it's already refreshed, so makes me wonder if you have time sync issue, the timestamps and your query may not align so your query and Kibana using slightly different windows (like from 11:23-11:44) but after a few minute you see data - we see this a lot in our system with wrong timezones, though of course that's after 1 or more hours.
If you can repeat this, suggest using a direct cURL or Devtools query instead, which will have a lot fewer parameters and added 'stuff' from Kibana - just pull last docs sorted by descending timestamp to see what ES really has, compare to your query, etc.
Of course, just for testing, you can temporarily adjust referesh_interval shorter (watch loads if you have high index rates) down to the default of 1s to see if helps, but it should not matter if Kibana or cURL really can see the data.
Hi @Christian_Dahlqvist,
refresh_interval is not set manually, it should take the default value for it i.e. 1 second.
We have 3 Master, 3 client and 2 data nodes, overall usually we have 13-14 nodes in the kubernetes cluster.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.