### Description

### Description

The _terms_enum API [currently supports](https://github.com/elastic/elasticsearch/pull/83244) keyword, constant_keyword and flattened fields. 

Kibana would also like to support `ip` field type: https://github.com/elastic/kibana/issues/140266
Opening this issue to discuss if this is possible. 

I tried to workaround this limitation in Kibana using terms_agg for suggestions, but this also didn't work: 
https://github.com/elastic/kibana/issues/140266#issuecomment-1240828371



Note: there is a similar issue and some progress on _version_ type: https://github.com/elastic/elasticsearch/issues/83403



server/src/main/java/org/elasticsearch/index/mapper/KeywordFieldMapper.java
}
        public Builder(String name, Version indexCreatedVersion) {
            this(name, null, ScriptCompiler.NONE, indexCreatedVersion);
        }
        public Builder ignoreAbove(int ignoreAbove) {
            this.ignoreAbove.setValue(ignoreAbove);
            return this;
        }
        Builder normalizer(String normalizerName) {
            this.normalizer.setValue(normalizerName);
            return this;
        }
        Builder nullValue(String nullValue) {
            this.nullValue.setValue(nullValue);
            return this;
        }
        public Builder docValues(boolean hasDocValues) {
            this.hasDocValues.setValue(hasDocValues);
            return this;
        }
        public Builder dimension(boolean dimension) {
            this.dimension.setValue(dimension);
            return this;
        }
        private FieldValues<String> scriptValues() {
            if (script.get() == null) {
                return null;
            }
            StringFieldScript.Factory scriptFactory = scriptCompiler.compile(script.get(), StringFieldScript.CONTEXT);
            return scriptFactory == null