FileDocCategorySizeDatePackage
StopAnalyzer.javaAPI DocApache Lucene 1.4.31801Thu May 20 18:38:58 BST 2004org.apache.lucene.analysis

StopAnalyzer

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

Fields Summary
private Set
stopWords
public static final String[]
ENGLISH_STOP_WORDS
An array containing some common English words that are not usually useful for searching.
Constructors Summary
public StopAnalyzer()
Builds an analyzer which removes words in ENGLISH_STOP_WORDS.


           
    
    stopWords = StopFilter.makeStopSet(ENGLISH_STOP_WORDS);
  
public StopAnalyzer(String[] stopWords)
Builds an analyzer which removes words in the provided array.

    this.stopWords = StopFilter.makeStopSet(stopWords);
  
Methods Summary
public org.apache.lucene.analysis.TokenStreamtokenStream(java.lang.String fieldName, java.io.Reader reader)
Filters LowerCaseTokenizer with StopFilter.

    return new StopFilter(new LowerCaseTokenizer(reader), stopWords);