public boolean overlaps(Range other) {
            if (other.from.isSmallerOrEqualTo(this.to) && other.to.isLargerOrEqualTo(this.from)) return true;
            if (other.to.isLargerOrEqualTo(this.from) && other.from.isSmallerOrEqualTo(this.to)) return true;
            return false;
        }
Returns true if these two ranges overlap
container-search/src/main/java/com/yahoo/search/querytransform/RangeQueryOptimizer.java