mirror of https://github.com/apache/lucene.git
LUCENE-1371: add convenience method TopDocs Searcher.search(Query query, int n)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@691549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
120d01bb09
commit
4ae5fcbf53
|
@ -136,6 +136,16 @@ public abstract class Searcher implements Searchable {
|
|||
return search(createWeight(query), filter, n);
|
||||
}
|
||||
|
||||
/** Finds the top <code>n</code>
|
||||
* hits for <code>query</code>.
|
||||
*
|
||||
* @throws BooleanQuery.TooManyClauses
|
||||
*/
|
||||
public TopDocs search(Query query, int n)
|
||||
throws IOException {
|
||||
return search(query, null, n);
|
||||
}
|
||||
|
||||
/** Returns an Explanation that describes how <code>doc</code> scored against
|
||||
* <code>query</code>.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue