postingHeap.enqueue((docid << 32) + i);
}
boolean targetResultSetSizeReached = false;
Queue<CandidateResult> candidateResultList = new PriorityQueue<CandidateResult>();
int currentDocId = selectMinimumDocId(postingHeap);
IterablePosting currentPosting = null;
double threshold = 0.0d;
//int scored = 0;
while (currentDocId != -1) {
// We create a new candidate for the doc id considered
CandidateResult currentCandidate = new CandidateResult(currentDocId);
int currentPostingListIndex = (int) (postingHeap.firstLong() & 0xFFFF), nextDocid;
//System.err.println("currentDocid="+currentDocId+" currentPostingListIndex="+currentPostingListIndex);
currentPosting = plm.getPosting(currentPostingListIndex);
//scored++;
do {
assignScore(currentPostingListIndex, currentCandidate);
//assignScore(currentPostingListIndex, wm[currentPostingListIndex], currentCandidate, currentPosting);
long newDocid = currentPosting.next();
postingHeap.dequeueLong();
if (newDocid != IterablePosting.EOL)
postingHeap.enqueue((newDocid << 32) + currentPostingListIndex);
else if (postingHeap.isEmpty())
break;