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 ...

What about access to inner fields? Like I wrote, Comparable are
self-contained in the sense that they know how to compare themselves to the
same instances. However Comparators can only compare public variables.

On Dec 6, 2007 7:20 PM, Michael Busch <[EMAIL PROTECTED]> wrote:

> Shai Erera wrote:
>
> >
> > Comparators however have an advantage - in that specific case I could
> create
> > two Comparators: (1) compares by the score and then by doc (2) compares
> by
>
> That's why I hesitate to add the Comparable interface to ScoreDoc:
> Different people might want different implementations of compare(), and
> that makes it questionable which default compare() implementation we
> should commit. I think Comparator solves this problem quite nicely.
>
> -Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Regards,

Shai Erera

Reply via email to