I opened this issue in the ES github: https://github.com/elastic/elasticsearch/issues/36274
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 to
flushthe index, I tried to
forcemergethe index and to
refreshthe index. nothing changed. The
store.sizeonly gets updated only after 10 seconds, no matter what.
Not only that, the
_statspath of the index (
http;//localhost:9200/<indexes>/_stats) also show the wrong storage size (in the
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?