/** * Returns the scorer to be used for match counting and score summing. Uses * the given required scorer and the prohibitedScorers. * * @param requiredCountingSumScorer * A required scorer already built. */ private NodeScorer addProhibitedScorers(final NodeScorer requiredCountingSumScorer) throws IOException { return (prohibitedScorers.size() == 0) ? requiredCountingSumScorer // no prohibited : new NodeReqExclScorer(requiredCountingSumScorer, ((prohibitedScorers.size() == 1) ? prohibitedScorers.get(0) : new NodeDisjunctionScorer(weight, prohibitedScorers))); }
private NodeScorer countingDisjunctionSumScorer(final List<NodeScorer> scorers) throws IOException { return new NodeDisjunctionScorer(this.getWeight(), scorers) { @Override public float scoreInNode() throws IOException { final float nodeScore = super.scoreInNode(); coordinator.nrMatchers += super.nrMatchers(); return nodeScore; } }; }