Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10106

Sort optimization mistakenly skips the first documents

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.0, 8.9
    • 9.0, 8.10
    • core/search
    • None
    • New

    Description

      romseygeek and I looked into a test failure that occurs in Elasticsearch with Lucene 9. The first documents of subsequent segments are mistakenly skipped when sort optimization is enabled. We should initialize `maxDocVisited` in NumericComparator to -1 instead of 0.

      Attachments

        Activity

          People

            dnhatn Nhat Nguyen
            dnhatn Nhat Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m