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

DirectoryTaxonomyWriter makes a commit even if no changes were made

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4, 6.0
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Now that IndexWriter allows committing changes even if the only change is setCommitData, DirectoryTaxonomyWriter creates empty commits because whenever you call commit/close, it sets as commitData the indexEpoch, thereby creating unnecessary commit points.

      I think that DirTaxoWriter should track if the index is dirty ... or preferably get that from IndexWriter (i.e. getChangeCount or something). I'll create a test case exposing the bug and then fix DTW.

        Attachments

        1. LUCENE-4972.patch
          5 kB
          Shai Erera
        2. LUCENE-4972.patch
          5 kB
          Shai Erera

          Activity

            People

            • Assignee:
              shaie Shai Erera
              Reporter:
              shaie Shai Erera
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: