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

        Robert Muir created issue -
        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)
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-5500.patch [ 12633381 ]
        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
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.8 [ 12326269 ]
        Fix Version/s 5.0 [ 12321663 ]
        Resolution Fixed [ 1 ]
        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
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1h 32m 1 Robert Muir 07/Mar/14 16:13
        Resolved Resolved Closed Closed
        51d 7h 12m 1 Uwe Schindler 28/Apr/14 00:25

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development