Getting the count of the number of indices using ElasticSearch

I am writing code in which we insert 200,000 elements into the ElasticSearch index.

Although this works well when we get the number of elements in the index, to make sure everything goes well, we don't get the same number. However, if we wait a second or two, the score will be correct.

Therefore, is there a software way to get a real account from ElasticSearch without the need sleepor the like?

+5
source share
1 answer

Refresh. , index.refresh_interval, 1 . elasticsearch , , . , ( , ) elasticsearch.

+7

All Articles