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

Add utility method to Analyzer: public final TokenStream tokenStream(String fieldName,String text)

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.3.1
    • 4.4, 6.0
    • modules/analysis
    • None
    • New

    Description

      It might be a good idea to remove tons of useless code from tests:
      Most people use TokenStreams and Analyzers by only passing a String, wrapped by a StringReader. It would make life easier, if Analyzer would have an additional public (and final!!!) method that simply does the wrapping with StringReader by itsself. It might maybe not even needed to throw IOException (not sure)

      Attachments

        1. LUCENE-5097.patch
          110 kB
          Uwe Schindler
        2. LUCENE-5097.patch
          15 kB
          Uwe Schindler
        3. LUCENE-5097.patch
          13 kB
          Uwe Schindler

        Activity

          People

            uschindler Uwe Schindler
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: