From db9e4e97db56cbac46dd0f6c938657ed9e3fd92c Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Tue, 14 Dec 2004 19:00:01 +0000 Subject: [PATCH] document that TooManyClauses is thrown by several methods git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150707 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/search/Searchable.java | 8 +++++++- src/java/org/apache/lucene/search/Searcher.java | 12 ++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) 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 { * *

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 doc 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 { * *

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 query. */ + + /** Returns the documents matching query. + * @throws BooleanQuery.TooManyClauses + */ public final Hits search(Query query) throws IOException { return search(query, (Filter)null); } /** Returns the documents matching query and - filter. */ + * filter. + * @throws BooleanQuery.TooManyClauses + */ public Hits search(Query query, Filter filter) throws IOException { return new Hits(this, query, filter); } /** Returns documents matching query sorted by * sort. + * @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 query and filter, * sorted by sort. + * @throws BooleanQuery.TooManyClauses */ public Hits search(Query query, Filter filter, Sort sort) throws IOException { @@ -61,6 +68,7 @@ public abstract class Searcher implements Searchable { *

Note: The score 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 {