lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Resolved: (LUCENE-1356) Allow easy extensions of TopDocCollector
Date Wed, 03 Sep 2008 23:21:44 GMT


Doron Cohen resolved LUCENE-1356.

       Resolution: Fixed
    Lucene Fields: [New, Patch Available]  (was: [Patch Available, New])

Thanks Shai !

> Allow easy extensions of TopDocCollector
> ----------------------------------------
>                 Key: LUCENE-1356
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Doron Cohen
>            Priority: Minor
>             Fix For: 2.3.3, 2.4
>         Attachments: 1356-2.patch, 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:
For additional commands, e-mail:

View raw message