Solr
  1. Solr
  2. SOLR-8114

Grouping.java: sort variable names confusion

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None
    • Flags:
      Patch

      Description

      The undistributed case i.e. solr/Grouping.java's variable names confusingly differ from the names used by lucene (and by the distributed case).

      Specifically the name groupSort in lucene (and in the distributed case) means between-groups-sort but in the Grouping.java it means within-group-sort.

      lucene:

      TermFirstPassGroupingCollector(... Sort groupSort ...)
      TermSecondPassGroupingCollector(... Sort groupSort, Sort withinGroupSort ...)
      

      solr:

      SearchGroupsFieldCommand.java: firstPassGroupingCollector = new TermFirstPassGroupingCollector(field.getName(), groupSort, topNGroups);
      TopGroupsFieldCommand.java: secondPassCollector = new TermSecondPassGroupingCollector(... groupSort, sortWithinGroup ...);
      
      Grouping.java:    public Sort groupSort;   // the sort of the documents *within* a single group.
      Grouping.java:    public Sort sort;        // the sort between groups
      Grouping.java:  firstPass = new TermFirstPassGroupingCollector(groupBy, sort, actualGroupsToFind);
      Grouping.java: secondPass = new TermSecondPassGroupingCollector(... sort, groupSort ...);
      

      This JIRA proposes to rename the Grouping.java variables to remove the confusion:

      • part 1: in Grouping.java rename groupSort to withinGroupSort
      • part 2: in Grouping.java rename sort to groupSort
      1. SOLR-8114-part1of2.patch
        7 kB
        Christine Poerschke
      2. SOLR-8114-part2of2.patch
        5 kB
        Christine Poerschke

        Activity

        Hide
        Christine Poerschke added a comment -

        proposed patches (against trunk)

        Show
        Christine Poerschke added a comment - proposed patches (against trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1709230 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1709230 ]

        SOLR-8114: in Grouping.java rename groupSort to withinGroupSort

        Show
        ASF subversion and git services added a comment - Commit 1709230 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1709230 ] SOLR-8114 : in Grouping.java rename groupSort to withinGroupSort
        Hide
        ASF subversion and git services added a comment -

        Commit 1709239 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1709239 ]

        SOLR-8114: in Grouping.java rename groupSort to withinGroupSort (merge in revision 1709230 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1709239 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1709239 ] SOLR-8114 : in Grouping.java rename groupSort to withinGroupSort (merge in revision 1709230 from trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1709288 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1709288 ]

        SOLR-8114: in Grouping.java rename sort to groupSort

        Show
        ASF subversion and git services added a comment - Commit 1709288 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1709288 ] SOLR-8114 : in Grouping.java rename sort to groupSort
        Hide
        ASF subversion and git services added a comment -

        Commit 1709324 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1709324 ]

        SOLR-8114: in Grouping.java rename sort to groupSort (merge in revision 1709288 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1709324 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1709324 ] SOLR-8114 : in Grouping.java rename sort to groupSort (merge in revision 1709288 from trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1714960 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1714960 ]

        SOLR-8114: correct CHANGES.txt entry location (was in 6.0.0 section but should have been 5.4.0 section instead)

        Show
        ASF subversion and git services added a comment - Commit 1714960 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1714960 ] SOLR-8114 : correct CHANGES.txt entry location (was in 6.0.0 section but should have been 5.4.0 section instead)
        Hide
        ASF subversion and git services added a comment -

        Commit 1714963 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1714963 ]

        SOLR-8114: correct CHANGES.txt entry location (was in 6.0.0 section but should have been 5.4.0 section instead) (merge in revision 1714960 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1714963 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1714963 ] SOLR-8114 : correct CHANGES.txt entry location (was in 6.0.0 section but should have been 5.4.0 section instead) (merge in revision 1714960 from trunk)

          People

          • Assignee:
            Christine Poerschke
            Reporter:
            Christine Poerschke
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development