[ 
https://issues.apache.org/jira/browse/LUCENE-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623274#action_12623274
 ] 

Doron Cohen commented on LUCENE-1356:
-------------------------------------

You're right, this is confusing indeed.
Although it is not public or protected there may users code 
(residing in same package) relying on this method so it can't
just be removed but rather just deprecated.

{quote}
If you agree, I'll reflect that in the 2nd patch I want to create (which adds 
javadoc).
{quote}
Yes thanks!

> Allow easy extensions of TopDocCollector
> ----------------------------------------
>
>                 Key: LUCENE-1356
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1356
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Doron Cohen
>            Priority: Minor
>         Attachments: 1356.patch
>
>
> TopDocCollector's members and constructor are declared either private or 
> package visible. It makes it hard to extend it as if you want to extend it 
> you can reuse its *hq* and *totatlHits* members, but need to define your own. 
> It also forces you to override getTotalHits() and topDocs().
> By changing its members and constructor (the one that accepts a PQ) to 
> protected, we allow users to extend it in order to get a different view of 
> 'top docs' (like TopFieldCollector does), but still enjoy its getTotalHits() 
> and topDocs() method implementations.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to