From 779c332a8c76f5de171b5d0239e5123ff8b5a10d Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Tue, 22 Mar 2022 15:39:59 +0000 Subject: [PATCH] LUCENE-10477: mention 'call multiple times' in Query.rewrite javadoc (#758) --- lucene/core/src/java/org/apache/lucene/search/Query.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/search/Query.java b/lucene/core/src/java/org/apache/lucene/search/Query.java index c41caf251e5..4f04728395d 100644 --- a/lucene/core/src/java/org/apache/lucene/search/Query.java +++ b/lucene/core/src/java/org/apache/lucene/search/Query.java @@ -73,6 +73,11 @@ public abstract class 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. + * + * @see IndexSearcher#rewrite(Query) */ public Query rewrite(IndexReader reader) throws IOException { return this;