Hi,
I opened this issue in the ES github: Elasticsearch store.size and pri.store.size does not updated after creating an index · Issue #36274 · elastic/elasticsearch · GitHub
Shortly, I had this problem:
When I'm creating an index, I'm looking at the cat indices path with
http;//localhost:9200/_cat/indices/<indexes>
for the store.size which the index takes, and it's always takes only 324 bytes, thought after 10 seconds approximately the store.size is updated to the real storage size of the index.
I tried toflush
the index, I tried toforcemerge
the index and torefresh
the index. nothing changed. Thestore.size
only gets updated only after 10 seconds, no matter what.
Not only that, the_stats
path of the index (http;//localhost:9200/<indexes>/_stats
) also show the wrong storage size (in thestore
key).
I got this answer:
Elasticsearch caches store size and performs refresh
each index.store.stats_refresh_interval, which is exactly 10 seconds
by default. Consider changing this setting.
But I don't want to overload my easticsearch and want the refresh to occur only once, after I create the index.
Is there any REST request I can perform to update the store stats immediately after the index creation?