I recommend to use Index Templates for this. It allows to set this setting for all indices that match the index template pattern.
You could even go so far to extract the setting to a component template and reuse it in multiple Index Templates.
I would advise to be cautious with this setting and only enabling it where absolutely necessary as this limit is there for a reason:
The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance degradations and memory issues, especially in clusters with a high load or few resources.
If you increase this setting, we recommend you also increase the indices.query.bool.max_clause_count setting, which limits the maximum number of clauses in a query.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.