A primary shard can store up to Integer.MAX_VALUE -128 documents, how could es do if if the number of documents exceeds this value? thanks

as above. thanks

I believe the limit is just below 2 billion documents. If you have more data, use indices with multiple primary shards. You may also find that the optimal shard size for performance reasons may be lower than this limit.

emm. I know what you mean, but if I set 1 shard for the index at the beginning ,and as time goes by, the number of documents exceeds this value?

Then you need to change to a large number of shards per index. If you are on a recent version and added the required settings at index creation time, you can use the split index API. Otherwise you most likely need to reindex into a new index with a larger number of primary shards. The easiest way might be to create an index with a number of primary shards already at the outset to account for the growth.

ok, i see . thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.