Description
BooleanWeight.bulkScorer creates a sub bulk scorer for all clauses until it meets a clause that is not optional (the only kind of clause it can deal with). However the Weight.bulkScorer method is sometimes costly, so BooleanWeight.bulkScorer should first inspect all clauses to see if any of them is not optional to avoid creating costly bulk scorers to only trash them later.