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

IndexWriter.forceMerge may run unneeded merges

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.1, 4.8, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I was running some tests and was surprised that IndexWriter.forceMerge caused the index to be merged even when the index contains a single segment with no deletions.

      This is due to MergePolicy.isMerged which always returns false with the default configuration although merge policies rely on it to know whether a single-segment index should be merged.

        Attachments

          Activity

            People

            • Assignee:
              jpountz Adrien Grand
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: