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

Massive Code Duplication in Contrib Analyzers - unifly the analyzer ctors


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


      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.


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

          Issue Links



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


                • Created: