com.lucene.analysis
Class StopAnalyzer

java.lang.Object
  |
  +--com.lucene.analysis.Analyzer
        |
        +--com.lucene.analysis.StopAnalyzer

public final class StopAnalyzer
extends Analyzer

Filters LetterTokenizer with LowerCaseFilter and StopFilter.


Field Summary
static String[] ENGLISH_STOP_WORDS
          An array containing some common English words that are not usually useful for searching.
 
Constructor Summary
StopAnalyzer()
          Builds an analyzer which removes words in ENGLISH_STOP_WORDS.
StopAnalyzer(String[] stopWords)
          Builds an analyzer which removes words in the provided array.
 
Method Summary
 TokenStream tokenStream(Reader reader)
          Filters LowerCaseTokenizer with StopFilter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENGLISH_STOP_WORDS

public static final 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(String[] stopWords)
Builds an analyzer which removes words in the provided array.
Method Detail

tokenStream

public final TokenStream tokenStream(Reader reader)
Filters LowerCaseTokenizer with StopFilter.
Overrides:
tokenStream in class Analyzer