code: protected int searchBucketIndex(byte[] key, int leftIndex, int rightIndex) {
          if (KeyUtils.compareKey(key, maxRangeValues[rightIndex]) > 0) {
              return 0;
          }
          int idx = Arrays.binarySearch(maxRangeValues, leftIndex, rightIndex, key, new ByteArrayComparator());
          idx = idx < 0 ? -idx - 1 : idx;
          if (idx > rightIndex) {
              return -1;
          } else {
              return idx;
          }
      }
docs: Searches for the given <code>key</code> in {@link #maxRangeValues} and returns the index of the corresponding
  range. Remember: this may not be the bucketId