lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Is TopDocCollector's collect() implementation correct?
Date Fri, 27 Mar 2009 08:51:31 GMT
2009/3/27 Shai Erera <serera@gmail.com>:
> I really liked HItCollector and hate to give up the name ... However
> Collector is fine with me either, and it is at least more generic than
> HitCollector ...
>
> Hitable sounds too aggressive/violent to me :)

Now that you raised this objection, I can't get the image out of my
head, and I agree :)

> BTW, I guess I should create some new searcher API which receives this
> Collector class (is Collector the chosen name?) and deprecate those who
> accept HitCollector?
> Those can also skip the instanceof check, and wrapping of HC to MRHC ...

OK that'd be great.  There are also default "score" methods in Scorer
that take HitCollector which'll have to be deprecated as well, and
some scorers (eg BooleanScorer) define those methods.

> That also means that I should throw that MRHC wrapper (which rebases doc
> Ids)? If HitCollector is deprecated, then there's no need to keep it.  But
> perhaps we want it there in 2.9 for easier migration? Personally I think
> it's redundant since in 3.0 people will need to change all their collectors
> anyway (since HitCollector will be removed, and every class which extends
> HitCollector will need be modified). What do you think?

I think discard it, assuming the above full-replacement approach
doesn't hit any snags.

> Also, there's no need to deprecate MRHC, since it's only in the trunk - I
> can simply rename it, right?

Exactly :)  A nice freedom... maybe we should never make any releases!
 (kidding)

> Ok I'll go ahead and prepare a patch. We can discuss the name more, at the
> end it will just be a short "refactor" action in Eclipse, so that shouldn't
> hold us (or me) up.

OK thanks Shai.  Make sure you mark the issue as Fix Version 2.9.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message