/** * Creates a {@link NodeBooleanScorer} with the given lists of * required, prohibited and optional scorers. In no required scorers are added, * at least one of the optional scorers will have to match during the search. * * @param weight * The BooleanWeight to be used. * @param required * the list of required scorers. * @param prohibited * the list of prohibited scorers. * @param optional * the list of optional scorers. */ public NodeBooleanScorer(final AbstractNodeBooleanWeight weight, final List<NodeScorer> required, final List<NodeScorer> prohibited, final List<NodeScorer> optional) throws IOException { super(weight); coordinator = new Coordinator(); optionalScorers = optional; requiredScorers = required; prohibitedScorers = prohibited; coordinator.init(); countingSumScorer = this.makeCountingSumScorer(); }