This relates to #86790, which added logic that generates the `index.routing_path` index setting from from field mapped as keyword and marked as time series dimension in the mapping.

This builds on top of this and should also check dynamic templates if field template definition are of type `keyword` and `time_series_dimension` attribute is enabled. The `path_match` should then be added to the `index.routing_path` index setting.

This request originated from: https://github.com/elastic/kibana/issues/141796#issuecomment-1260619212
server/src/main/java/org/elasticsearch/index/mapper/MapperService.java
*/
    public DocumentMapper documentMapper() {
        return mapper;
    }
    /**
     * Returns {@code true} if the given {@code mappingSource} includes a type
     * as a top-level object.
     */
    public static boolean isMappingSourceTyped(String type, Map<String, Object> mapping) {
        return mapping.size() == 1 && mapping.keySet().iterator().next().equals(type);
    }
    /**
     * Resolves a type from a mapping-related request into the type that should be used when
     * merging and updating mappings.
     *
     * If the special `_doc` type is provided, then we replace it with the actual type that is
     * being used in the mappings. This allows typeless APIs such as 'index' or 'put mappings'
     * to work against indices with a custom type name.
     */
    private String resolveDocumentType(String type) {
        if (MapperService.SINGLE_MAPPING_NAME.equals(type)) {
            if (mapper != null) {
                return mapper.type();
            }
        }
        return type;
    }
    /**
     * Given the full name of a field, returns its {@link MappedFieldType}.
     */