Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2
    • Component/s: modules/join
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      In addition to the existing score modes add 'min' score mode that aggregates the lowest child score to the parent hit.

      1. LUCENE-6389.patch
        23 kB
        Martijn van Groningen
      2. LUCENE-6389.patch
        16 kB
        Martijn van Groningen
      3. LUCENE-6389.patch
        16 kB
        Martijn van Groningen

        Issue Links

          Activity

          Hide
          Martijn van Groningen added a comment -

          Attached a patch that adds ScoreMode.Min and lets all existing join implementations use it.

          Show
          Martijn van Groningen added a comment - Attached a patch that adds ScoreMode.Min and lets all existing join implementations use it.
          Hide
          Adrien Grand added a comment -

          Is it a mistake?

          +      case Min:
          +        globalOrdinalsWithScoreCollector = new GlobalOrdinalsWithScoreCollector.Max(joinField, ordinalMap, valueCount);
                   break;
          
          Show
          Adrien Grand added a comment - Is it a mistake? + case Min: + globalOrdinalsWithScoreCollector = new GlobalOrdinalsWithScoreCollector.Max(joinField, ordinalMap, valueCount); break ;
          Hide
          Martijn van Groningen added a comment -

          oops... yes it is!

          Show
          Martijn van Groningen added a comment - oops... yes it is!
          Hide
          Martijn van Groningen added a comment - - edited

          Updated the patch and added a test that would have catched the mistake made in the first version of the patch.

          Also this tests uncovered an issue with min score mode. All scores happened to be 0, due to fact that the score arrays weren't initialised with the correct start values.

          Show
          Martijn van Groningen added a comment - - edited Updated the patch and added a test that would have catched the mistake made in the first version of the patch. Also this tests uncovered an issue with min score mode. All scores happened to be 0, due to fact that the score arrays weren't initialised with the correct start values.
          Hide
          Adrien Grand added a comment -

          One minor thing that annoys me is the array sizing which starts at 256 and then grows. So if we have bugs in the growth logic, it would not be caught by unit tests unless we have more than 256 unique terms. Maybe we could just use 0 as an initial size? This way we don't need to fill it in the constructor and even the simplest unit test would explore the growth code path?

          Otherwise +1!

          Show
          Adrien Grand added a comment - One minor thing that annoys me is the array sizing which starts at 256 and then grows. So if we have bugs in the growth logic, it would not be caught by unit tests unless we have more than 256 unique terms. Maybe we could just use 0 as an initial size? This way we don't need to fill it in the constructor and even the simplest unit test would explore the growth code path? Otherwise +1!
          Hide
          Martijn van Groningen added a comment -

          Maybe we could just use 0 as an initial size?

          agreed, that makes it less error prone and the win is minimal from setting initial size to 256.

          I'll commit this soon, thanks for reviewing!

          Show
          Martijn van Groningen added a comment - Maybe we could just use 0 as an initial size? agreed, that makes it less error prone and the win is minimal from setting initial size to 256. I'll commit this soon, thanks for reviewing!
          Hide
          ASF subversion and git services added a comment -

          Commit 1674622 from Martijn van Groningen in branch 'dev/trunk'
          [ https://svn.apache.org/r1674622 ]

          LUCENE-6389: Added ScoreMode.Min that aggregates the lowest child score to the parent hit.

          Show
          ASF subversion and git services added a comment - Commit 1674622 from Martijn van Groningen in branch 'dev/trunk' [ https://svn.apache.org/r1674622 ] LUCENE-6389 : Added ScoreMode.Min that aggregates the lowest child score to the parent hit.
          Hide
          ASF subversion and git services added a comment -

          Commit 1674623 from Martijn van Groningen in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1674623 ]

          LUCENE-6389: Added ScoreMode.Min that aggregates the lowest child score to the parent hit.

          Show
          ASF subversion and git services added a comment - Commit 1674623 from Martijn van Groningen in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1674623 ] LUCENE-6389 : Added ScoreMode.Min that aggregates the lowest child score to the parent hit.
          Hide
          Anshum Gupta added a comment -

          Bulk close for 5.2.0.

          Show
          Anshum Gupta added a comment - Bulk close for 5.2.0.
          Hide
          Mikhail Khludnev added a comment -

          for the reference, there was an issue fixed under SOLR-5882 and released in 5.3

          Show
          Mikhail Khludnev added a comment - for the reference, there was an issue fixed under SOLR-5882 and released in 5.3

            People

            • Assignee:
              Unassigned
              Reporter:
              Martijn van Groningen
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development