Exemplo n.º 1
0
 public override sealed void Collect(int doc)
 {
     docs.AddDoc(doc);
     if (keepScores)
     {
         if (totalHits >= scores.Length)
         {
             float[] newScores = new float[ArrayUtil.Oversize(totalHits + 1, 4)];
             Array.Copy(scores, 0, newScores, 0, totalHits);
             scores = newScores;
         }
         scores[totalHits] = scorer.Score();
     }
     totalHits++;
 }