- Documented HitCollector a bit better.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149995 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2003-06-05 05:44:41 +00:00
parent c28f3706d4
commit b2c7697eb2
2 changed files with 11 additions and 2 deletions

View File

@ -56,6 +56,7 @@ package org.apache.lucene.search;
/** Lower-level search API.
* @see Searcher#search(Query,HitCollector)
* @version $Id$
*/
public abstract class HitCollector {
/** Called once for every non-zero scoring document, with the document number
@ -77,6 +78,10 @@ public abstract class HitCollector {
* Searcher#doc(int)} or {@link
* org.apache.lucene.index.IndexReader#document(int)} on every document
* number encountered. Doing so can slow searches by an order of magnitude
* or more. */
* or more.
* <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.
*/
public abstract void collect(int doc, float score);
}

View File

@ -79,7 +79,11 @@ public abstract class Searcher implements Searchable {
* <p>Applications should only use this if they need <i>all</i> of the
* matching documents. The high-level search API ({@link
* Searcher#search(Query)}) is usually more efficient, as it skips
* non-high-scoring hits. */
* non-high-scoring hits.
* <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.
*/
public void search(Query query, HitCollector results)
throws IOException {
search(query, (Filter)null, results);