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

IndexWriter#addIndices should not sort indices if they are not already sorted

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Today IndexWriter#addIndices silently re-sort non-sorted indices when they are added in a sorted index. This is not safe because the sort is done entirely in memory and cannot handle big segments efficiently. This leniency was added because prior to 6.5, segments produced by flushes were not sorted, they had to wait for a merge to apply the index sorting. Now that segments are always sorted (LUCENE-7579) we should remove this ability and throw an error if the sort of the current index does not match with the candidate.

        Attachments

        1. LUCENE-8505.patch
          10 kB
          Jim Ferenczi

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jim.ferenczi Jim Ferenczi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: