Add dynapmic alias field if target field exist

Hi !

I need add alias field if target field exist or string.
I do this with dynamic templates and aliases field

{
  "mappings": {
    "dynamic_templates": [
            {
        "add_alias_for_open": {
          "match_mapping_type":   "string",
          "match":"Open2",
          "mapping": {
            "Open": {
                "type": "alias",
                "path": "Open2" 
            }
          }
        }
      }
    ]
  }
}'

But getting an error
"reason" : "unknown parameter [Open] on mapper [__dynamic__alias_for_open] of type [null]"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.