lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadav Har'El" <>
Subject Re: Extending TopDocCollector
Date Wed, 13 Aug 2008 13:04:21 GMT
On Thu, Aug 07, 2008, Shai Erera wrote about "Extending TopDocCollector":
> Is it possible to change TopDocCollector members to 'protected' instead of
> 'package' and 'private'? It will allow to easily extend it. Today, I have a
> need to extend it, but since I cannot use its members I have to implement
> the getTotalHits() and topDocs() exactly the same as TopDocCollector.

Sounds logical to me. After all, TopDocCollector already has a subclass
(TopFieldDocCollector), and it is quite natural that users might want to
add more - to implement different sorting mechanisms (e.g., according
to payloads, database data, or whatever).

Does anyone disagree? Is there a reason why this change should not be done?

Nadav Har'El                        |       Wednesday, Aug 13 2008, 12 Av 5768
IBM Haifa Research Lab              |-----------------------------------------
                                    |A bird in the hand is safer than one           |overhead.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message