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
+ incomingMappingSource
                + "\nmerged:\n"
                + mergedMappingSource;
        return true;
    }
    boolean assertNoUpdateRequired(final IndexMetadata newIndexMetadata) {
        MappingMetadata mapping = newIndexMetadata.mapping();
        if (mapping != null) {
            
            
            
            
            
            Mapping newMapping = parseMapping(mapping.type(), mapping.source());
            final CompressedXContent currentSource = this.mapper.mappingSource();
            final CompressedXContent newSource = newMapping.toCompressedXContent();
            if (Objects.equals(currentSource, newSource) == false) {
                throw new IllegalStateException(
                    "expected current mapping [" + currentSource + "] to be the same as new mapping [" + newSource + "]"
                );
            }
        }
        return true;
    }
    public void merge(IndexMetadata indexMetadata, MergeReason reason) {
        assert reason != MergeReason.MAPPING_UPDATE_PREFLIGHT;
        MappingMetadata mappingMetadata = indexMetadata.mapping();
        if (mappingMetadata != null) {
            merge(mappingMetadata.type(), mappingMetadata.source(), reason);
        }