docs: private boolean goToNextDoc() throws IOException {
      if (docId == NO_MORE_DOCS) {
        return true;
      } else {
        docId = spans1.spans.nextDoc();
        if (docId == NO_MORE_DOCS) {
          return true;
        } else {
          int spans2DocId = spans2.spans.docID();
          if (spans2DocId < docId) {
            spans2DocId = spans2.spans.advance(docId);
          }
          if (docId != spans2DocId) {
            return spans1.spans.nextStartPosition() != NO_MORE_POSITIONS;
          } else if (goToNextStartPosition()) {
            return true;
          } else {
            reset();
            return false;
          }
        }
      }
    }