You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2022/03/22 15:40:10 UTC
[lucene] branch main updated: LUCENE-10477: mention 'call multiple times' in Query.rewrite javadoc (#758)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 779c332 LUCENE-10477: mention 'call multiple times' in Query.rewrite javadoc (#758)
779c332 is described below
commit 779c332a8c76f5de171b5d0239e5123ff8b5a10d
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Tue Mar 22 15:39:59 2022 +0000
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 c41caf2..4f04728 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.
+ *
+ * <p>Callers are expected to call <code>rewrite</code> 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;