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

Make WordDelimiterFilter's instantiation more readable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5, 4.0-ALPHA
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Currently WordDelimiterFilter's constructor is:

      public WordDelimiterFilter(TokenStream in,
      	                             byte[] charTypeTable,
      	                             int generateWordParts,
      	                             int generateNumberParts,
      	                             int catenateWords,
      	                             int catenateNumbers,
      	                             int catenateAll,
      	                             int splitOnCaseChange,
      	                             int preserveOriginal,
      	                             int splitOnNumerics,
      	                             int stemEnglishPossessive,
      	                             CharArraySet protWords) {
      

      which means its instantiation is an unreadable combination of 1s and 0s.

      We should improve this by either using a Builder, 'int flags' or an EnumSet.

        Attachments

        1. LUCENE-3410.patch
          21 kB
          Chris Male
        2. LUCENE-3410.patch
          21 kB
          Chris Male
        3. LUCENE-3410.patch
          25 kB
          Chris Male

          Activity

            People

            • Assignee:
              cmale Chris Male
              Reporter:
              cmale Chris Male
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: