Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » analysis » standard » [javadoc | source]
org.apache.lucene.analysis.standard
public class: StandardAnalyzer [javadoc | source]
java.lang.Object
   org.apache.lucene.analysis.Analyzer
      org.apache.lucene.analysis.standard.StandardAnalyzer

All Implemented Interfaces:
    Closeable

Filters StandardTokenizer with StandardFilter , LowerCaseFilter and StopFilter , using a list of English stop words.

You must specify the required Version compatibility when creating StandardAnalyzer:

Field Summary
public static final  Set<?> STOP_WORDS_SET    An unmodifiable set containing some common English words that are usually not useful for searching. 
public static final  int DEFAULT_MAX_TOKEN_LENGTH    Default maximum allowed token length 
Fields inherited from org.apache.lucene.analysis.Analyzer:
overridesTokenStreamMethod
Constructor:
 public StandardAnalyzer(Version matchVersion) 
    Parameters:
    matchVersion - Lucene version to match See above
 public StandardAnalyzer(Version matchVersion,
    Set<?> stopWords) 
    Builds an analyzer with the given stop words.
    Parameters:
    matchVersion - Lucene version to match See above
    stopWords - stop words
 public StandardAnalyzer(Version matchVersion,
    File stopwords) throws IOException 
    Builds an analyzer with the stop words from the given file.
    Parameters:
    matchVersion - Lucene version to match See above
    stopwords - File to read stop words from
    Also see:
    WordlistLoader#getWordSet(File)
 public StandardAnalyzer(Version matchVersion,
    Reader stopwords) throws IOException 
    Builds an analyzer with the stop words from the given reader.
    Parameters:
    matchVersion - Lucene version to match See above
    stopwords - Reader to read stop words from
    Also see:
    WordlistLoader#getWordSet(Reader)
Method from org.apache.lucene.analysis.standard.StandardAnalyzer Summary:
getMaxTokenLength,   reusableTokenStream,   setMaxTokenLength,   tokenStream
Methods from org.apache.lucene.analysis.Analyzer:
close,   getOffsetGap,   getPositionIncrementGap,   getPreviousTokenStream,   reusableTokenStream,   setOverridesTokenStreamMethod,   setPreviousTokenStream,   tokenStream
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.analysis.standard.StandardAnalyzer Detail:
 public int getMaxTokenLength() 
 public TokenStream reusableTokenStream(String fieldName,
    Reader reader) throws IOException 
 public  void setMaxTokenLength(int length) 
    Set maximum allowed token length. If a token is seen that exceeds this length then it is discarded. This setting only takes effect the next time tokenStream or reusableTokenStream is called.
 public TokenStream tokenStream(String fieldName,
    Reader reader)