Skip to content

Apache Lucene open-source search software

slightly improve the TooManyClauses exception documentation

Daniel Naberb74370baecb8
diff --git a/src/java/org/apache/lucene/search/BooleanQuery.java b/src/java/org/apache/lucene/search/BooleanQuery.java
index a7e7690bd53..16242e0f623 100644
--- a/src/java/org/apache/lucene/search/BooleanQuery.java
+++ b/src/java/org/apache/lucene/search/BooleanQuery.java
@@ -44,7 +44,10 @@ public class BooleanQuery extends Query {
"1024"));
/** Thrown when an attempt is made to add more than {@link
- * #getMaxClauseCount()} clauses. */
+ * #getMaxClauseCount()} clauses. This typically happens if
+ * a PrefixQuery, FuzzyQuery, WildcardQuery, or RangeQuery
+ * is expanded to many terms during search.
+ */
public static class TooManyClauses extends RuntimeException {}
/** Return the maximum number of clauses permitted, 1024 by default.