There are two ways. The "best" way is to use a bool query with a must_not that filters out documents with those IP addresses. The slower way is to use the bucket_selector aggregation. That one is slower because it works on the results. The filtering one should be faster because it has to calculate less data. But they are not the same. They will produce slightly different results though, so use the one that works for you.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.