Lucene - Core
  1. Lucene - Core
  2. LUCENE-5500

SortingMergePolicy should error if the Sort refers to the score

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8, Trunk
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      It should throw an exception if Sort.needsScores() == true. This does not make sense at index-time.

      I think there is no reason for this method to be package-private either (as its just useful sugar, it loops over each SortField and checks needsScores).

        Activity

        Hide
        Robert Muir added a comment -

        Note you will get an exception today: but not until the actual merge. The idea here is to fail when you configure the thing on indexwriter!

        Show
        Robert Muir added a comment - Note you will get an exception today: but not until the actual merge. The idea here is to fail when you configure the thing on indexwriter!
        Hide
        Robert Muir added a comment -

        simple patch. I added tests for both the MP and the FilterReader (as its public today)

        Show
        Robert Muir added a comment - simple patch. I added tests for both the MP and the FilterReader (as its public today)
        Hide
        Adrien Grand added a comment -

        +1

        Show
        Adrien Grand added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1575306 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1575306 ]

        LUCENE-5500: SortingMergePolicy should error if the Sort refers to the score

        Show
        ASF subversion and git services added a comment - Commit 1575306 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1575306 ] LUCENE-5500 : SortingMergePolicy should error if the Sort refers to the score
        Hide
        ASF subversion and git services added a comment -

        Commit 1575307 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1575307 ]

        LUCENE-5500: SortingMergePolicy should error if the Sort refers to the score

        Show
        ASF subversion and git services added a comment - Commit 1575307 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1575307 ] LUCENE-5500 : SortingMergePolicy should error if the Sort refers to the score
        Hide
        Uwe Schindler added a comment -

        Close issue after release of 4.8.0

        Show
        Uwe Schindler added a comment - Close issue after release of 4.8.0

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development