rewrite

open override fun rewrite(indexSearcher: IndexSearcher): Query

Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Callers are expected to call rewrite multiple times if necessary, until the rewritten query is the same as the original query.

The rewrite process may be able to make use of IndexSearcher's executor and be executed in parallel if the executor is provided.

See also