### 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
if (leaves.size() == 1) {
                    SortedSetDocValues sortedSetDocValues = leaves.get(0).reader().getSortedSetDocValues(field);
                    if (sortedSetDocValues == null) {
                        return null;
                    } else {
                        return new SortedSetDocValuesTerms(sortedSetDocValues);
                    }
                }
                final List<Terms> termsPerLeaf = new ArrayList<>(leaves.size());
                final List<ReaderSlice> slicePerLeaf = new ArrayList<>(leaves.size());
                for (int leafIdx = 0; leafIdx < leaves.size(); leafIdx++) {
                    LeafReaderContext ctx = leaves.get(leafIdx);
                    SortedSetDocValues sortedSetDocValues = ctx.reader().getSortedSetDocValues(field);
                    if (sortedSetDocValues != null) {
                        termsPerLeaf.add(new SortedSetDocValuesTerms(sortedSetDocValues));
                        slicePerLeaf.add(new ReaderSlice(ctx.docBase, r.maxDoc(), leafIdx));
                    }
                }
                if (termsPerLeaf.isEmpty()) {
                    return null;
                } else {
                    return new MultiTerms(termsPerLeaf.toArray(EMPTY_ARRAY), slicePerLeaf.toArray(ReaderSlice.EMPTY_ARRAY));
                }
            }
            private final SortedSetDocValues values;
            SortedSetDocValuesTerms(SortedSetDocValues values) {
                this.values = values;
            }
            @Override
            public TermsEnum iterator() throws IOException {