### 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 (terms == null) {
                
                return null;
            }
            Automaton a = caseInsensitive ? AutomatonQueries.caseInsensitivePrefix(prefix) : Automata.makeString(prefix);
            a = Operations.concatenate(a, Automata.makeAnyString());
            a = MinimizationOperations.minimize(a, Integer.MAX_VALUE);
            CompiledAutomaton automaton = new CompiledAutomaton(a);
            BytesRef searchBytes = searchAfter == null ? null : new BytesRef(searchAfter);
            if (automaton.type == AUTOMATON_TYPE.ALL) {
                TermsEnum result = terms.iterator();
                if (searchAfter != null) {
                    result = new SearchAfterTermsEnum(result, searchBytes);
                }
                return result;
            }
            return terms.intersect(automaton, searchBytes);
        }
        /**
         * A simple terms implementation for SortedSetDocValues that only provides access to {@link TermsEnum} via
         * {@link #iterator} and {@link #intersect(CompiledAutomaton, BytesRef)} methods.
         * We have this custom implementation based on {@link MultiTerms} instead of using
         * {@link org.apache.lucene.index.MultiDocValues#getSortedSetValues(IndexReader, String)}
         * because {@link org.apache.lucene.index.MultiDocValues} builds global ordinals up-front whereas
         * {@link MultiTerms}, which exposes the terms enum via {@link org.apache.lucene.index.MultiTermsEnum},
         * merges terms on the fly.
         */
        static class SortedSetDocValuesTerms extends Terms {
            public static Terms getTerms(IndexReader r, String field) throws IOException {
                final List<LeafReaderContext> leaves = r.leaves();