ES: Indexing Failed due to Shard Limit
Problem
While indexing any/all object(s) under the Global Search Index Tool, it fails with the error - 'Indexing Failed. Field Limit Reached' even after the updating the Field Limit to 5000. Upon checking the logs this is the error identified:
[ERROR] Elasticsearch exception [type=validation_exception, reason=Validation Failed: 1: this action would add [5] total shards, but this cluster currently has [997]/[1000] maximum shards open;]
ElasticsearchStatusException[Elasticsearch exception [type=validation_exception, reason=Validation Failed: 1: this action would add [5] total shards, but this cluster currently has [997]/[1000] maximum shards open;]]
Solution
To address the issue of shard limit hitting 1000, add this to your <elasticsearch 7.10.2>/config/elasticsearch.yml file and restart elasticsearch:
cluster.max_shards_per_node: 5000