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

IndexWriter.forceMerge may run unneeded merges

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.7.1, 4.8, 6.0
    • None
    • None
    • 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

        1. LUCENE-5481.patch
          10 kB
          Adrien Grand

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: