Dynamic Templates Not Applied

Hello, a couple questions regarding Dynamic Templates.

  1. Can my dynamic template mapping map an object or just simple type properties?
    i.e. I defined this template to map this object each time a property modules is encountered.
"dynamic_templates": [
    {
      "modules-template": {
        "match": "modules",
        "mapping": {
          "properties": {
            "id": {
              "type": "keyword",
              "ignore_above": "1024"
            },
            "minOccurs": {
              "type": "long"
            },
            "maxOccurs": {
              "type": "long"
            },
            "minModules": {
              "type": "long"
            },
            "maxModules": {
              "type": "long"
            },
            "readOnlyFields": {
              "type": "keyword",
              "ignore_above": "1024"
            },
            "isCritical": {
              "type": "boolean"
            }
          }
        }
      }
   }
]

Is this possible?
2. Even if I define each property of the modules object, I can't get mappings to generate with "dynamic": false. Is it possible to use dynamic templates while "dynamic": false for the index/type?

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