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

(zcx) #1

as above. thanks

(Christian Dahlqvist) #2

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.

(zcx) #3

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?

(Christian Dahlqvist) #4

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.

(zcx) #5

ok, i see . thanks!

(system) #6

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