: In general I would agree that people may want different implementations for : compare(), but I hardly see that's the case for ScoreDoc. After all, you can : either compare it by score or by doc (at least now). I believe that since : most people use the TopDocsHitCollector, they prefer the compare-by-score : approach ...
sure, but that's not all your suggested compareTo does ... it first compares by score and then does a secondary comparison by docId. some people might want docs added "more recently" to sort first instead, some might want docid left out of hte comparison all together. This is where Comparators are more useful then compareTo methods. We can add *lots* of different static inner Comparator classes to ScoreDoc, but if we add any compareTo method it could wind up burning someone down the road. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]