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

FrenchAnalyzer's tokenStream method does not honour the contract of Analyzer

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2
    • 3.0
    • modules/analysis
    • None
    • New, Patch Available

    Description

      In Analyzer :

      /** Creates a TokenStream which tokenizes all the text in the provided
          Reader.  Default implementation forwards to tokenStream(Reader) for 
          compatibility with older version.  Override to allow Analyzer to choose 
          strategy based on document and/or field.  Must be able to handle null
          field name for backward compatibility. */
        public abstract TokenStream tokenStream(String fieldName, Reader reader);
      

      and in FrenchAnalyzer

      public final TokenStream tokenStream(String fieldName, Reader reader) {
      
          if (fieldName == null) throw new IllegalArgumentException("fieldName must not be null");
          if (reader == null) throw new IllegalArgumentException("reader must not be null");
      

      Attachments

        1. LUCENE-1359.patch
          2 kB
          Robert Muir

        Activity

          People

            rcmuir Robert Muir
            alynch Andrew Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: