What is a good number of fields to have in an index?

@sidharth_vijayakumar
An index can have many documents (similar in nature) and every document can have a certain number of fields.

An index can be divided into multiple shards . There is a limitation of 2.14 Billion docs per shard at lucene level but you should not go beyond 1 Billion documents at any point ( in fact best practice is to have a shard of 20-30 GB in size).

If you use mapping then the default limit of index.mapping.total_fields.limit is 1000 in ES .

Note: this limitation can be changed if needed (not recommended) and is for a document. That means one document should not have more than 1000 fields in your index.

You can refer this post to get an idea.

1 Like