lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject PATCH: unused code in BooleanScorer.java
Date Sun, 02 May 2004 20:27:17 GMT
Dear developers,

All tests pass here with this change in BooleanScorer.java.
The collectHits method is not used anywhere in the Lucene code
and it's not part of the API defined by Scorer.

Have a nice day,
Paul


Index: BooleanScorer.java
===================================================================
RCS file: /home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/search/BooleanScorer.java,v
retrieving revision 1.7
diff -u -3 -p -r1.7 BooleanScorer.java
--- BooleanScorer.java	29 Mar 2004 22:48:03 -0000	1.7
+++ BooleanScorer.java	2 May 2004 20:17:13 -0000
@@ -151,21 +151,6 @@ final class BooleanScorer extends Scorer
       this.scorer = scorer;
     }
 
-    public final void collectHits(HitCollector results) {
-      final int required = scorer.requiredMask;
-      final int prohibited = scorer.prohibitedMask;
-      final float[] coord = scorer.coordFactors;
-
-      for (Bucket bucket = first; bucket!=null; bucket = bucket.next) {
-	if ((bucket.bits & prohibited) == 0 &&	  // check prohibited
-	    (bucket.bits & required) == required){// check required
-	  results.collect(bucket.doc,		  // add to results
-			  bucket.score * coord[bucket.coord]);
-	}
-      }
-      first = null;				  // reset for next round
-    }
-
     public final int size() { return SIZE; }
 
     public HitCollector newCollector(int mask) {


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message