Index: BooleanScorer2.java =================================================================== --- BooleanScorer2.java (revision 178866) +++ BooleanScorer2.java (working copy) @@ -25,7 +25,7 @@ *
Uses ConjunctionScorer, DisjunctionScorer, ReqOptScorer and ReqExclScorer. *
Implements skipTo(), and has no limitations on the numbers of added scorers. */ -public class BooleanScorer2 extends Scorer { +class BooleanScorer2 extends Scorer { private ArrayList requiredScorers = new ArrayList(); private ArrayList optionalScorers = new ArrayList(); private ArrayList prohibitedScorers = new ArrayList(); @@ -292,6 +292,12 @@ return sum * coordinator.coordFactor(); } + /** Skips to the first match beyond the current whose document number is + * greater than or equal to a given target. + *
When this method is used the {@link #explain(int)} method should not be used. + * @param target The target document number. + * @return true iff there is such a match. + */ public boolean skipTo(int target) throws IOException { if (countingSumScorer == null) { initCountingSumScorer(); @@ -299,6 +305,10 @@ return countingSumScorer.skipTo(target); } + /** Throws an UnsupportedOperationException. + * @param doc The document number for the explanation. + * @todo Implement an explanation of the coordination factor. + */ public Explanation explain(int doc) throws IOException { throw new UnsupportedOperationException(); /* How to explain the coordination factor?