Dynamic Templates on Documents with Inner Objects

Hello community, I'm trying to apply a dynamic template to my index, even though the console doesn't gives me any error when creating the dynamic template, my documents are still taking the default elasticsearch mappings instead of the ones specified in the dynamic template.

The template works fine when changing the document structure to a single object, I would like to make it work with a inner object structure.

Below are the document structure and the dynamic template that I'm trying to apply:

POST patient_records/_doc
      "reason":"Montlhy Check"
PUT patient_records
  "mappings": {

Thanks in advance!
Eduardo Iglesias

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