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

Please consider opening MultiCollector::getCollectors for public use

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 8.10.1
    • 9.1, 10.0 (main)
    • core/search
    • None
    • New

    Description

      The usage of MultiCollector sometimes is very convenient along with CollectorManagers instances (as an alternative to MultiCollectorManager), for example:

      class SomeCollectorManager implements CollectorManager<Collector, ?> {
          @Override
          public Collector newCollector() throws IOException {
            return MultiCollector.wrap(new Collector1(), new Collector2(), ...);
          }
          @Override
          public List<Integer> reduce(Collection<Collector> collectors) throws IOException {
            return ...;
          }
      }

      Unfortunately, the reduce() phase is lacking the access to  MultiCollector::getCollectors method, since it is package protected at the moment. Making MultiCollector::getCollectors  public would make it convenient to use MultiCollector + CollectorManager and implement the reduce phase by accessing individual collectors.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reta Andriy Redko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h