What is the Opensearch equivalent of the Elasticsearch config value index.mapping.total_fields.limit

Viewed 12

I have an error in my Opensearch cluster: "Limit of total fields [1000] has been exceeded". I can see that this problem can be fixed in Elasticsearch by setting index.mapping.total_fields.limit to a higher value.

But looking in my Opensearch cluster settings, this setting doesn't seem to be there. I tried modifying it using Terraform but I got this error:

 Error: ValidationException: Unrecognized advanced option 'index.mapping.total_fields.limit' passed in advancedOptions.
│ 
│   with module.opensearch.aws_elasticsearch_domain.aws_opensearch,
│   on ../modules/opensearch/main.tf line 27, in resource "aws_elasticsearch_domain" "aws_opensearch":
│   27: resource "aws_elasticsearch_domain" "aws_opensearch" {

I can't find any mention of how to adjust the mapping total fields limit in the Opensearch documentation for our cluster version 1.1

Does anyone know the name of the equivalent setting in Opensearch?

1 Answers

This is an index-level setting, you can retrieve it with

GET your-index/_settings?include_defaults

You can change it dynamically with

PUT your-index/_settings
{
  "index.mapping.total_fields.limit": 2000
}

Note that when increasing this setting, it is recommended to also increase indices.query.bool.max_clause_count, but since that's a static setting, it's unlikely you can change it in AWS:

Related