Skip to content

Apache Lucene open-source search software

document that TooManyClauses is thrown by several methods

Daniel Naberdb9e4e97db56
diff --git a/src/java/org/apache/lucene/search/Searchable.java b/src/java/org/apache/lucene/search/Searchable.java
index 2d0f87f52cc..5f76a044ba0 100644
--- a/src/java/org/apache/lucene/search/Searchable.java
+++ b/src/java/org/apache/lucene/search/Searchable.java
@@ -41,6 +41,7 @@ public interface Searchable extends java.rmi.Remote {
* @param query to match documents
* @param filter if non-null, a bitset used to eliminate some documents
* @param results to receive hits
+ * @throws BooleanQuery.TooManyClauses
*/
void search(Query query, Filter filter, HitCollector results)
throws IOException;
@@ -70,6 +71,7 @@ public interface Searchable extends java.rmi.Remote {
*
* <p>Applications should usually call {@link Searcher#search(Query)} or
* {@link Searcher#search(Query,Filter)} instead.
+ * @throws BooleanQuery.TooManyClauses
*/
TopDocs search(Query query, Filter filter, int n) throws IOException;
@@ -79,7 +81,9 @@ public interface Searchable extends java.rmi.Remote {
*/
Document doc(int i) throws IOException;
- /** Expert: called to re-write queries into primitive queries. */
+ /** Expert: called to re-write queries into primitive queries.
+ * @throws BooleanQuery.TooManyClauses
+ */
Query rewrite(Query query) throws IOException;
/** Returns an Explanation that describes how <code>doc</code> scored against
@@ -89,6 +93,7 @@ public interface Searchable extends java.rmi.Remote {
* and, for good performance, should not be displayed with every hit.
* Computing an explanation is as expensive as executing the query over the
* entire index.
+ * @throws BooleanQuery.TooManyClauses
*/
Explanation explain(Query query, int doc) throws IOException;
@@ -99,6 +104,7 @@ public interface Searchable extends java.rmi.Remote {
*
* <p>Applications should usually call {@link
* Searcher#search(Query,Filter,Sort)} instead.
+ * @throws BooleanQuery.TooManyClauses
*/
TopFieldDocs search(Query query, Filter filter, int n, Sort sort)
throws IOException;
diff --git a/src/java/org/apache/lucene/search/Searcher.java b/src/java/org/apache/lucene/search/Searcher.java
index a1f450234c1..ac85481dd01 100644
--- a/src/java/org/apache/lucene/search/Searcher.java
+++ b/src/java/org/apache/lucene/search/Searcher.java
@@ -22,19 +22,25 @@ import java.io.IOException;
* Implements some common utility methods.
*/
public abstract class Searcher implements Searchable {
- /** Returns the documents matching <code>query</code>. */
+
+ /** Returns the documents matching <code>query</code>.
+ * @throws BooleanQuery.TooManyClauses
+ */
public final Hits search(Query query) throws IOException {
return search(query, (Filter)null);
}
/** Returns the documents matching <code>query</code> and
- <code>filter</code>. */
+ * <code>filter</code>.
+ * @throws BooleanQuery.TooManyClauses
+ */
public Hits search(Query query, Filter filter) throws IOException {
return new Hits(this, query, filter);
}
/** Returns documents matching <code>query</code> sorted by
* <code>sort</code>.
+ * @throws BooleanQuery.TooManyClauses
*/
public Hits search(Query query, Sort sort)
throws IOException {
@@ -43,6 +49,7 @@ public abstract class Searcher implements Searchable {
/** Returns documents matching <code>query</code> and <code>filter</code>,
* sorted by <code>sort</code>.
+ * @throws BooleanQuery.TooManyClauses
*/
public Hits search(Query query, Filter filter, Sort sort)
throws IOException {
@@ -61,6 +68,7 @@ public abstract class Searcher implements Searchable {
* <p>Note: The <code>score</code> passed to this method is a raw score.
* In other words, the score will not necessarily be a float whose value is
* between 0 and 1.
+ * @throws BooleanQuery.TooManyClauses
*/
public void search(Query query, HitCollector results)
throws IOException {