Below is a mock index that contains a dynamic template utilizing path_match with regex to index specifically named objects into an Elasticsearch schema.
path_match is not regex but takes a path syntax. Looking at your dynamic mapping definition I see an extra dot at the end of the expression that might be there by accident.
This way the some_template mapping applies to top_level_field.sub_level_field1.subfield, top_level_field.sub_level_field2.subfield and so on, and it will map it as keyword.
Since top_level_field is dynamic, it can take other sub-fields that do not match for the template, for those the default mapping will apply.
Thanks for the quick response Adam. This makes sense, I thought that template may limit the top level field to only accept a singular sub field or in this case the list of fields within the regex, but because its marked as dynamic, I see that is not the case. Thanks for the response!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.