otis 2003/06/04 22:44:42
Modified: src/java/org/apache/lucene/search HitCollector.java
Searcher.java
Log:
- Documented HitCollector a bit better.
Revision Changes Path
1.3 +6 -1
jakarta-lucene/src/java/org/apache/lucene/search/HitCollector.java
Index: HitCollector.java
===================================================================
RCS file:
/home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/HitCollector.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HitCollector.java 25 Sep 2001 19:03:35 -0000 1.2
+++ HitCollector.java 5 Jun 2003 05:44:41 -0000 1.3
@@ -56,6 +56,7 @@
/** 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 @@
* Searcher#doc(int)} or [EMAIL PROTECTED]
* 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);
}
1.9 +5 -1 jakarta-lucene/src/java/org/apache/lucene/search/Searcher.java
Index: Searcher.java
===================================================================
RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/Searcher.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Searcher.java 29 Jan 2003 17:18:55 -0000 1.8
+++ Searcher.java 5 Jun 2003 05:44:41 -0000 1.9
@@ -79,7 +79,11 @@
* <p>Applications should only use this if they need <i>all</i> of the
* matching documents. The high-level search API ([EMAIL PROTECTED]
* 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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]