Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1356

Allow easy extensions of TopDocCollector

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.4
    • core/index
    • None
    • New, Patch Available

    Description

      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.

      Attachments

        1. 1356-2.patch
          2 kB
          Shai Erera
        2. 1356.patch
          0.8 kB
          Shai Erera

        Activity

          People

            doronc Doron Cohen
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: