QueryRewriter should be passed the query that would be used otherwise. If QR cannot handle it, it will be returned unmodified. So QR must be used when a query has been prepared and the result of QR should be used to replace it.
QueryRewriter should be passed the query that would be used otherwise. If QR cannot handle it, it will be returned unmodified. So QR must be used when a query has been prepared and the result of QR should be used to replace it.