ElasticSearch: map required (non-dynamic) fields but have one property ("meta data") dynamic
<p>I want to create an index that holds some content that represents articles. </p>

<p>An article consist of a <code>title</code>, <code>excerpt</code>, <code>body</code>, <code>publish_date</code> and <code>meta</code>. All of these are required, except Meta. I want no other properties to be settable.</p>

<p>Additionally I want "<code>meta</code>" to be able to hold whatever data is put in there. </p>

<p>I attempted with setting the dynamic parameter on the article to false and then the meta object to true, but with no luck. (Example can be seen below)</p>

<p>(Note: I understand that using a meta as such mean that all the values of the array will be of the same data type and I am okay with this.)</p>

<pre><code>{
    "mappings": {
        "article": {
            "type":"object",
            "dynamic" : "false",
            "properties": {
                "title":          {"type": "string"},
                "excerpt":        {"type": "string"},
                "body":           {"type": "string"},
                "publish_date":   {"type": "date"},
                "meta": {
                    "type":       "object"
                    "dynamic" :   "true",
                    "properties": {
                    }
                }
            }
        }
    }
}
</code></pre>

<p><strong><em>TL:DR - How do I define a mapping that makes certain properties required, but leaves one property (meta array/object) open for filling, while preventing any property that isn't required to be set outside of the meta object.</em></strong></p>