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

Massive Code Duplication in Contrib Analyzers - unifly the analyzer ctors

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 4.0-ALPHA
    • modules/analysis
    • None
    • New

    Description

      Due to the variouse tokenStream APIs we had in lucene analyzer subclasses need to implement at least one of the methodes returning a tokenStream. When you look at the code it appears to be almost identical if both are implemented in the same analyzer. Each analyzer defnes the same inner class (SavedStreams) which is unnecessary.
      In contrib almost every analyzer uses stopwords and each of them creates his own way of loading them or defines a large number of ctors to load stopwords from a file, set, arrays etc.. those ctors should be removed / deprecated and eventually removed.

      Attachments

        1. LUCENE-2034.patch
          39 kB
          Simon Willnauer
        2. LUCENE-2034.patch
          56 kB
          Simon Willnauer
        3. LUCENE-2034.patch
          62 kB
          Simon Willnauer
        4. LUCENE-2034.patch
          64 kB
          Simon Willnauer
        5. LUCENE-2034.txt
          70 kB
          Simon Willnauer
        6. LUCENE-2034,patch
          80 kB
          Simon Willnauer
        7. LUCENE-2034,patch
          81 kB
          Simon Willnauer
        8. LUCENE-2034.patch
          80 kB
          Simon Willnauer
        9. LUCENE-2034.patch
          77 kB
          Simon Willnauer
        10. LUCENE-2034.patch
          77 kB
          Simon Willnauer
        11. LUCENE-2034.patch
          86 kB
          Robert Muir
        12. LUCENE-2034.patch
          87 kB
          Simon Willnauer

        Issue Links

          Activity

            People

              rcmuir Robert Muir
              simonw Simon Willnauer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: