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

Make DirectoryTaxonomyWriter's indexWriter member private

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 3.5, 4.0-ALPHA
    • modules/facet
    • None
    • New, Patch Available

    Description

      DirectoryTaxonomyWriter has a protected indexWriter member. As far as I can tell, for two reasons:

      1. protected openIndexWriter method which lets you open your own IW (e.g. with a custom IndexWriterConfig).
      2. protected closeIndexWriter which is a hook for letting you close the IW you opened in the previous one.

      The fixes are trivial IMO:

      1. Modify the method to return IW, and have the calling code set DTW's indexWriter member
      2. Eliminate closeIW. DTW already has a protected closeResources() which lets you clean other resources you've allocated, so I think that's enough.

      I'll post a patch shortly.

      Attachments

        1. LUCENE-3556.patch
          4 kB
          Shai Erera

        Activity

          People

            shaie Shai Erera
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: