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

Sort and SortField are not immutable

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      The `Sort` and `SortField` classes are currently mutable, which makes them dangerous to use in multiple threads. In particular, you can set an index sort on an IndexWriterConfig and then change its internal sort fields while the index is being written to.

      We should make all member fields on these classes final, and in addition we should make `Sort` final itself.

      Attachments

        Issue Links

          Activity

            People

              romseygeek Alan Woodward
              romseygeek Alan Woodward

              Dates

                Created:
                Updated:

                Time Tracking

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

                  Slack

                    Issue deployment