Documentation of 'org.apache.lucene.analysis.StopAnalyzer' Java class
StopAnalyzer
org.apache.lucene.analysis

Class StopAnalyzer



  • public final class StopAnalyzer
    extends Analyzer
    Filters LetterTokenizer with LowerCaseFilter and StopFilter.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String[] ENGLISH_STOP_WORDS
      An array containing some common English words that are not usually useful for searching.
    • Constructor Summary

      Constructors 
      Constructor and Description
      StopAnalyzer()
      Builds an analyzer which removes words in ENGLISH_STOP_WORDS.
      StopAnalyzer(java.io.File stopwordsFile)
      Builds an analyzer with the stop words from the given file.
      StopAnalyzer(java.io.Reader stopwords)
      Builds an analyzer with the stop words from the given reader.
      StopAnalyzer(java.util.Set stopWords)
      Builds an analyzer with the stop words from the given set.
      StopAnalyzer(java.lang.String[] stopWords)
      Builds an analyzer which removes words in the provided array.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      TokenStream reusableTokenStream(java.lang.String fieldName, java.io.Reader reader)
      Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
      TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
      Filters LowerCaseTokenizer with StopFilter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ENGLISH_STOP_WORDS

        public static final java.lang.String[] ENGLISH_STOP_WORDS
        An array containing some common English words that are not usually useful for searching.
    • Constructor Detail

      • StopAnalyzer

        public StopAnalyzer()
        Builds an analyzer which removes words in ENGLISH_STOP_WORDS.
      • StopAnalyzer

        public StopAnalyzer(java.util.Set stopWords)
        Builds an analyzer with the stop words from the given set.
      • StopAnalyzer

        public StopAnalyzer(java.lang.String[] stopWords)
        Builds an analyzer which removes words in the provided array.
      • StopAnalyzer

        public StopAnalyzer(java.io.File stopwordsFile)
                     throws java.io.IOException
        Builds an analyzer with the stop words from the given file.
        Throws:
        java.io.IOException
        See Also:
        WordlistLoader.getWordSet(File)
      • StopAnalyzer

        public StopAnalyzer(java.io.Reader stopwords)
                     throws java.io.IOException
        Builds an analyzer with the stop words from the given reader.
        Throws:
        java.io.IOException
        See Also:
        WordlistLoader.getWordSet(Reader)
    • Method Detail

      • tokenStream

        public TokenStream tokenStream(java.lang.String fieldName,
                                       java.io.Reader reader)
        Filters LowerCaseTokenizer with StopFilter.
        Specified by:
        tokenStream in class Analyzer
      • reusableTokenStream

        public TokenStream reusableTokenStream(java.lang.String fieldName,
                                               java.io.Reader reader)
                                        throws java.io.IOException
        Description copied from class: Analyzer
        Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.
        Overrides:
        reusableTokenStream in class Analyzer
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.