Lucene - Core
  1. Lucene - Core
  2. LUCENE-3556

Make DirectoryTaxonomyWriter's indexWriter member private

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: modules/facet
    • Labels:
      None
    • Lucene Fields:
      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.

        Activity

        Shai Erera created issue -
        Hide
        Shai Erera added a comment -

        Trivial patch against trunk. I'd like to commit this shortly.

        Show
        Shai Erera added a comment - Trivial patch against trunk. I'd like to commit this shortly.
        Shai Erera made changes -
        Field Original Value New Value
        Attachment LUCENE-3556.patch [ 12502110 ]
        Hide
        Shai Erera added a comment -

        Committed revision 1196982 (trunk).
        Committed revision 1196983 (3x).

        Show
        Shai Erera added a comment - Committed revision 1196982 (trunk). Committed revision 1196983 (3x).
        Shai Erera made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Uwe Schindler added a comment -

        Bulk close after release of 3.5

        Show
        Uwe Schindler added a comment - Bulk close after release of 3.5
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development