### 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
final BytesRef binaryValue = new BytesRef(value);
        if (fieldType().isDimension()) {
            context.getDimensions().addString(fieldType().name(), binaryValue);
        }
        if (fieldType.indexOptions() != IndexOptions.NONE || fieldType.stored() || fieldType().hasDocValues()) {
            
            
            
            
            if (binaryValue.length > MAX_TERM_LENGTH) {
                byte[] prefix = new byte[30];
                System.arraycopy(binaryValue.bytes, binaryValue.offset, prefix, 0, 30);
                String msg = "Document contains at least one immense term in field=\""
                    + fieldType().name()
                    + "\" (whose "
                    + "UTF8 encoding is longer than the max length "
                    + MAX_TERM_LENGTH
                    + "), all of which were "
                    + "skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense "
                    + "term is: '"
                    + Arrays.toString(prefix)
                    + "...'";
                throw new IllegalArgumentException(msg);
            }
            if (fieldType.indexOptions() != IndexOptions.NONE || fieldType().hasDocValues() || fieldType.stored()) {
                Field field = new KeywordField(fieldType().name(), binaryValue, fieldType);
                context.doc().add(field);
                if (fieldType().hasDocValues() == false && fieldType.omitNorms()) {
                    context.addToFieldNames(fieldType().name());
                }