docs: @Override
    public int nextDoc() throws IOException {
      do {
        IndexDoc indexDoc = mtasCodecInfo.getNextDoc(field, docId);
        if (indexDoc != null) {
          docId = indexDoc.docId;
          minPosition = Math.max(start, indexDoc.minPosition);
          maxPosition = Math.min(end, indexDoc.maxPosition);
          currentStartPosition = -1;
          currentEndPosition = -1;
        } else {
          docId = NO_MORE_DOCS;
          minPosition = NO_MORE_POSITIONS;
          maxPosition = NO_MORE_POSITIONS;
          currentStartPosition = NO_MORE_POSITIONS;
          currentEndPosition = NO_MORE_POSITIONS;
        }
      } while (docId != NO_MORE_DOCS && (minPosition > maxPosition));
      return docId;
    }