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
This commit is contained in:
Daniel Naber 2004-12-14 19:00:01 +00:00
parent 857624d038
commit db9e4e97db
2 changed files with 17 additions and 3 deletions

View File

@ -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;

View File

@ -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 {