code: @Override
    public MtasSpanQuery rewrite(IndexReader reader) throws IOException {
      MtasSpanQuery newQ1 = (MtasSpanQuery) q1.rewrite(reader);
      MtasSpanQuery newQ2 = (MtasSpanQuery) q2.rewrite(reader);
      if (newQ1 == null || newQ1 instanceof MtasSpanMatchNoneQuery
          || newQ2 == null || newQ2 instanceof MtasSpanMatchNoneQuery) {
        return new MtasSpanMatchNoneQuery(field);
      } else if (!newQ1.equals(q1) || !newQ2.equals(q2)) {
        return new MtasSpanPrecededByQuery(newQ1, newQ2).rewrite(reader);
      } else {
        return super.rewrite(reader);
      }
    }
docs: /*
  (non-Javadoc)
  
  @see mtas.search.spans.util.MtasSpanQuery#rewrite(org.apache.lucene.index.
  IndexReader)