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

Improve GroupingSearch API and extensibility

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      While looking at how to make grouping work with the new XValuesSource API in core, I thought I'd try and clean up GroupingSearch a bit. We have three different ways of grouping at the moment: by doc block, using a single-pass collector; by field; and by ValueSource. The latter two both use essentially the same two-pass mechanism, with different Collector implementations.

      I can see a number of possible improvements here:

      • abstract the two-pass collector creation into a factory API, which should allow us to add the XValuesSource implementations as well
      • clean up the generics on the two-pass collectors - maybe look into removing them entirely? I'm not sure they add anything really, and we don't have them on the equivalent plan search APIs
      • think about moving the document block method into the join module instead, alongside all the other block-indexing code
      • rename the various Collector base classes so that they don't have 'Abstract' in them anymore

        Attachments

        1. LUCENE-7617.patch
          21 kB
          Alan Woodward
        2. LUCENE-7617.patch
          112 kB
          Alan Woodward
        3. LUCENE-7617.patch
          116 kB
          Alan Woodward

          Activity

            People

            • Assignee:
              romseygeek Alan Woodward
              Reporter:
              romseygeek Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: