Dynamic Mapping

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OS Serverless Stack Management: 2.0.2

Describe the issue:
Updating the dynamic mapping for an existing index. I m trying to disable the dynamic mapping for an index using:
PUT /X-index/_settings
{
“index.mapper.dynamic”: false
}
But i m getting this error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "X-index Update to setting [index.mapper.dynamic] is not supported"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "X-index Update to setting [index.mapper.dynamic] is not supported"
  },
  "status": 400
}

Is the update to an existing index supported? I understood it is supported and will only apply to future datasets but doesnt seem so.

Configuration:

Relevant Logs or Screenshots:
Attached above

1 Like

@spookyOS Try this instead

PUT my_index/_mapping
{
  "dynamic": false
}
{
  "my_index": {
    "aliases": {},
    "mappings": {
      "dynamic": "false"
    },
    "settings": {
      "index": {
        "replication": {
          "type": "DOCUMENT"
        },
        "number_of_shards": "1",
        "provided_name": "my_index",
        "creation_date": "1742485738574",
        "number_of_replicas": "1",
        "uuid": "auKWXlRsSOaRk_OA6i2zUw",
        "version": {
          "created": "136407927"
        }
      }
    }
  }
}
3 Likes

This worked. Thanks. I previously tried

PUT /my_index/_mapping
{
  "dynamic": false
}

But that didnt work .