docs: private static Integer[] intersectedDocList(int[] facetDocList,
        Integer[] docSet) {
      if (facetDocList != null && docSet != null) {
        Integer[] c = new Integer[Math.min(facetDocList.length, docSet.length)];
        int ai = 0;
        int bi = 0;
        int ci = 0;
        while (ai < facetDocList.length && bi < docSet.length) {
          if (facetDocList[ai] < docSet[bi]) {
            ai++;
          } else if (facetDocList[ai] > docSet[bi]) {
            bi++;
          } else {
            if (ci == 0 || facetDocList[ai] != c[ci - 1]) {
              c[ci++] = facetDocList[ai];
            }
            ai++;
            bi++;
          }
        }
        return Arrays.copyOfRange(c, 0, ci);
      }
      return new Integer[] {};
    }