Lucene - Core
  1. Lucene - Core
  2. LUCENE-3223

SearchWithSortTask ignores sorting by Doc

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3, 4.0-ALPHA
    • Component/s: modules/benchmark
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      During my work in LUCENE-3912, I found the following code:

      if (field.equals("doc")) {
          sortField0 = SortField.FIELD_DOC;
      } if (field.equals("score")) {
          sortField0 = SortField.FIELD_SCORE;
      } ...
      

      This means the setting of SortField.FIELD_DOC is ignored. While I don't know much about this code, this seems like a valid setting and obviously just a bug.

      1. LUCENE-3223.patch
        3 kB
        Chris Male
      2. LUCENE-3223-test.patch
        2 kB
        Chris Male

        Activity

        Chris Male created issue -
        Hide
        Chris Male added a comment -

        Test demonstrating error.

        Show
        Chris Male added a comment - Test demonstrating error.
        Chris Male made changes -
        Field Original Value New Value
        Attachment LUCENE-3223-test.patch [ 12483238 ]
        Hide
        Chris Male added a comment -

        Simple patch fixing the problem. Do I need a CHANGES entry for trivial things like this?

        Show
        Chris Male added a comment - Simple patch fixing the problem. Do I need a CHANGES entry for trivial things like this?
        Chris Male made changes -
        Attachment LUCENE-3223.patch [ 12483240 ]
        Chris Male made changes -
        Assignee Chris Male [ cmale ]
        Hide
        Simon Willnauer added a comment -

        Simple patch fixing the problem. Do I need a CHANGES entry for trivial things like this?

        looks good, I don't think we need a changes entry for this. go ahead and commit!

        Show
        Simon Willnauer added a comment - Simple patch fixing the problem. Do I need a CHANGES entry for trivial things like this? looks good, I don't think we need a changes entry for this. go ahead and commit!
        Hide
        Chris Male added a comment -

        Committed revision 1137882.

        Show
        Chris Male added a comment - Committed revision 1137882.
        Chris Male made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Chris Male made changes -
        Fix Version/s 4.0 [ 12314025 ]
        Hide
        Uwe Schindler added a comment -

        Thanks, nice catch!

        Show
        Uwe Schindler added a comment - Thanks, nice catch!
        Hide
        Michael McCandless added a comment -

        Shouldn't this be backported to 3.x too?

        Show
        Michael McCandless added a comment - Shouldn't this be backported to 3.x too?
        Hide
        Chris Male added a comment -

        Backported to 3x (hopefully):

        Committed revision 1138240.

        Show
        Chris Male added a comment - Backported to 3x (hopefully): Committed revision 1138240.
        Chris Male made changes -
        Fix Version/s 3.3 [ 12316470 ]
        Hide
        Robert Muir added a comment -

        bulk close for 3.3

        Show
        Robert Muir added a comment - bulk close for 3.3
        Robert Muir made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Chris Male
            Reporter:
            Chris Male
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development