### 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/IpFieldMapper.java
return convertToDocValuesQuery(query);
                }
            });
        }
        /**
         * Processes query bounds into {@code long}s and delegates the
         * provided {@code builder} to build a range query.
         */
        public static Query rangeQuery(
            Object lowerTerm,
            Object upperTerm,
            boolean includeLower,
            boolean includeUpper,
            BiFunction<InetAddress, InetAddress, Query> builder
        ) {
            InetAddress lower;
            if (lowerTerm == null) {
                lower = InetAddressPoint.MIN_VALUE;
            } else {
                lower = parse(lowerTerm);
                if (includeLower == false) {
                    if (lower.equals(InetAddressPoint.MAX_VALUE)) {
                        return new MatchNoDocsQuery();
                    }
                    lower = InetAddressPoint.nextUp(lower);
                }
            }
            InetAddress upper;
            if (upperTerm == null) {
                upper = InetAddressPoint.MAX_VALUE;