docs: @Override
    public MtasSpanQuery rewrite(IndexReader reader) throws IOException {
      MtasSpanQuery newQ1 = (MtasSpanQuery) q1.rewrite(reader);
      MtasSpanQuery newQ2 = (MtasSpanQuery) q2.rewrite(reader);
      if (!newQ1.equals(q1) || !newQ2.equals(q2)) {
        return new MtasSpanIntersectingQuery(newQ1, newQ2).rewrite(reader);
      } else if (newQ1.equals(newQ2)) {
        return newQ1;
      } else {
  
        boolean returnNone;
        returnNone = newQ1.getMaximumWidth() != null
            && newQ1.getMaximumWidth() == 0;
        returnNone |= newQ2.getMaximumWidth() != null
            && newQ2.getMaximumWidth() == 0;
        if (returnNone) {
          return new MtasSpanMatchNoneQuery(this.getField());
        } else {
          return super.rewrite(reader);
        }
      }
    }