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

Rename MergePolicyWrapper to FilterMergePolicy and override all of MergePolicy

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4, 8.0
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      MergePolicy.getMaxCFSSegmentSizeMB is final, but the corresponding setter is not, which means that overriding it with anything other than a trivial delegation can only lead to confusion.

      The patch makes the method final and removes the trivial implementations from MergePolicyWrapper and NoMergePolicy.

      Michael McCandless also pointed out that the class name is nonstandard for similar adapter classes in Lucene, which are usually Filter*.java. Personally I was looking for MergePolicyAdapter, but if there is a prevailing convention here around Filter, does it make sense to change this class's name to FilterMergePolicy?

        Attachments

        1. LUCENE-8248.patch
          18 kB
          Michael Sokolov
        2. LUCENE-8248.2.patch
          13 kB
          Michael Sokolov
        3. LUCENE-8248.1.patch
          15 kB
          Michael Sokolov
        4. LUCENE-8248.patch
          12 kB
          Michael Sokolov
        5. MergePolicy.patch
          2 kB
          Michael Sokolov

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sokolov Michael Sokolov
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: