public int getMaxEndPosition(int docId, int position) throws IOException {
    if (ignoreSpans != null && docId == currentDocId) {
      if (position < minimumPosition) {
        throw new IOException(
            "Unexpected position, should be >= " + minimumPosition + "!");
      }
      computeFullEndPositionList(position);
      if (maxFullEndPosition.containsKey(position)) {
        return maxFullEndPosition.get(position);
      } else {
        return 0;
      }
    } else {
      return 0;
    }
  }
public int getMaxEndPosition ( int docId , int position ) throws IOException { if ( ignoreSpans != null && docId == currentDocId ) { if ( position < minimumPosition ) { throw new IOException ( "Unexpected position, should be >= " + minimumPosition + "!" ) ; } computeFullEndPositionList ( position ) ; if ( maxFullEndPosition . containsKey ( position ) ) { return maxFullEndPosition . get ( position ) ; } else { return 0 ; } } else { return 0 ; } }
Gets the max end position.

@param docId the doc id
@param position the position
@return the max end position
@throws IOException Signals that an I/O exception has occurred.