Example #1
0
 DocsAndCost(Scorer scorer, Collector sidewaysCollector) {
   final TwoPhaseIterator twoPhase = scorer.asTwoPhaseIterator();
   if (twoPhase == null) {
     this.approximation = scorer;
     this.twoPhase = null;
   } else {
     this.approximation = twoPhase.approximation();
     this.twoPhase = twoPhase;
   }
   this.sidewaysCollector = sidewaysCollector;
 }