### Elasticsearch Version

8.6.2

### Installed Plugins

mapper-size

### Java Version

_bundled_

### OS Version

3.10.0-1160.83.1.el7.x86_64

### Problem Description

Elastic mapper-size plugin fails on version 8.6.2 with updated templates for global, index, and component (both custom and managed).  It does work in 8.5.0

### Steps to Reproduce

Enable plugin, enable _size field, ingest data
![image](https://user-images.githubusercontent.com/11168913/224350960-498d5abd-62f5-4564-9f62-ac0702c2dd20.png)
![image](https://user-images.githubusercontent.com/11168913/224351072-977a4d34-68cb-448b-9fc3-86f223171de9.png)
![image](https://user-images.githubusercontent.com/11168913/224351165-e5ee1a54-216f-4b20-a571-a09ece65274c.png)
![image](https://user-images.githubusercontent.com/11168913/224351286-13593e3a-d9a2-4b47-ad3c-fa55ea63f4f5.png)

**Works in 8.5.0 though!**
![image](https://user-images.githubusercontent.com/11168913/224351648-5184f1df-0579-4d53-a7a1-97230570a1d5.png)



### Logs (if relevant)

_No response_
plugins/mapper-size/src/main/java/org/elasticsearch/index/mapper/size/SizeFieldMapper.java
private final Parameter<Explicit<Boolean>> enabled = updateableBoolParam("enabled", m -> toType(m).enabled, false);
        private Builder() {
            super(NAME);
        }
        @Override
        protected Parameter<?>[] getParameters() {
            return new Parameter<?>[] { enabled };
        }
        @Override
        public SizeFieldMapper build() {
            return new SizeFieldMapper(enabled.getValue(), new SizeFieldType());
        }
    }
    private static class SizeFieldType extends NumberFieldType {
        SizeFieldType() {
            super(NAME, NumberType.INTEGER);
        }
        @Override
        public ValueFetcher valueFetcher(SearchExecutionContext context, String format) {
            if (hasDocValues() == false) {
                return (lookup, doc, ignoredValues) -> List.of();
            }
            return new DocValueFetcher(docValueFormat(format, null), context.getForField(this, FielddataOperation.SEARCH));
        }
    }
    public static final TypeParser PARSER = new ConfigurableTypeParser(
        c -> new SizeFieldMapper(Explicit.IMPLICIT_FALSE, new SizeFieldType()),
        c -> new Builder()
    );
    private final Explicit<Boolean> enabled;