public SubScorer(Scorer scorer, bool required, bool prohibited, HitCollector collector, SubScorer next) { this.scorer = scorer; this.done = !scorer.Next(); this.required = required; this.prohibited = prohibited; this.collector = collector; this.next = next; }
public SubScorer(Scorer scorer, bool required, bool prohibited, HitCollector collector, SubScorer next) { this.scorer = scorer; this.done = !scorer.Next(); this.required = required; this.prohibited = prohibited; this.collector = collector; this.next = next; }
public override bool Next() { bool more; do { while (bucketTable.first != null) { // more queued current = bucketTable.first; bucketTable.first = current.next; // pop the queue // check prohibited & required if ((current.bits & prohibitedMask) == 0 && (current.bits & requiredMask) == requiredMask) { return(true); } } // refill the queue more = false; end += BucketTable.SIZE; for (SubScorer sub = scorers; sub != null; sub = sub.next) { Scorer scorer = sub.scorer; while (!sub.done && scorer.Doc() < end) { sub.collector.Collect(scorer.Doc(), scorer.Score()); sub.done = !scorer.Next(); } if (!sub.done) { more = true; } } }while (bucketTable.first != null | more); return(false); }