On Monday 10 December 2007 09:15:12 Paul Elschot wrote: > The current TopDocCollector only allocates a ScoreDoc when the given > score causes a new ScoreDoc to be added into the queue, but it does
I actually wrote my own HitCollector and now wonder about TopDocCollector: public void collect(int doc, float score) { if (score > 0.0f) { totalHits++; if (hq.size() < numHits || score >= minScore) { hq.insert(new ScoreDoc(doc, score)); minScore = ((ScoreDoc)hq.top()).score; // maintain minScore } } } 1) How can there be hits with score=0.0? 2) I don't understand minScore: inserts only document having a higher score than the lowest score already in queue? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]