## org.apache.lucene.analysis.ru
Class RussianAnalyzer

    java.lang.Object
      org.apache.lucene.analysis.Analyzer
          org.apache.lucene.analysis.ru.RussianAnalyzer

    public final class RussianAnalyzer

extends org.apache.lucene.analysis.Analyzer

`Analyzer` for Russian language.

Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.

Version:
  $Id: RussianAnalyzer.java 829134 2009-10-23 17:18:53Z mikemccand $

Field Summary

Fields inherited from class org.apache.lucene.analysis.Analyzer
`overridesTokenStreamMethod`

Constructor Summary
`RussianAnalyzer()` Deprecated. Use `RussianAnalyzer(Version)` instead
`RussianAnalyzer(char[] charset)` Deprecated. Use `RussianAnalyzer(Version)` instead.
`RussianAnalyzer(char[] charset, java.util.Map stopwords)` Deprecated. Use `RussianAnalyzer(Version, Map)` instead.
`RussianAnalyzer(char[] charset, java.lang.String[] stopwords)` Deprecated. Use `RussianAnalyzer(Version,String[])` instead.
`RussianAnalyzer(java.util.Map stopwords)` Deprecated. Use `RussianAnalyzer(Version, Map)` instead.
`RussianAnalyzer(java.lang.String[] stopwords)` Deprecated. Use `RussianAnalyzer(Version,String[])` instead.
`RussianAnalyzer(org.apache.lucene.util.Version matchVersion)`
`RussianAnalyzer(org.apache.lucene.util.Version matchVersion, java.util.Map stopwords)` Builds an analyzer with the given stop words.
`RussianAnalyzer(org.apache.lucene.util.Version matchVersion, java.lang.String[] stopwords)` Builds an analyzer with the given stop words.

Method Summary
`org.apache.lucene.analysis.TokenStream` `reusableTokenStream(java.lang.String fieldName, java.io.Reader reader)` Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.
`org.apache.lucene.analysis.TokenStream` `tokenStream(java.lang.String fieldName, java.io.Reader reader)` Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.

Methods inherited from class org.apache.lucene.analysis.Analyzer
`close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RussianAnalyzer

    public RussianAnalyzer()

  Deprecated. Use `RussianAnalyzer(Version)` instead

### RussianAnalyzer

    public RussianAnalyzer(org.apache.lucene.util.Version matchVersion)

### RussianAnalyzer

    public RussianAnalyzer(char[] charset)

  Deprecated. Use `RussianAnalyzer(Version)` instead.

  Builds an analyzer.

### RussianAnalyzer

    public RussianAnalyzer(char[] charset,
                           java.lang.String[] stopwords)

  Deprecated. Use `RussianAnalyzer(Version,String[])` instead.

  Builds an analyzer with the given stop words.

### RussianAnalyzer

    public RussianAnalyzer(java.lang.String[] stopwords)

  Deprecated. Use `RussianAnalyzer(Version,String[])` instead.

  Builds an analyzer with the given stop words.

### RussianAnalyzer

    public RussianAnalyzer(org.apache.lucene.util.Version matchVersion,
                           java.lang.String[] stopwords)

  Builds an analyzer with the given stop words.

### RussianAnalyzer

    public RussianAnalyzer(char[] charset,
                           java.util.Map stopwords)

  Deprecated. Use `RussianAnalyzer(Version, Map)` instead.

  Builds an analyzer with the given stop words. TODO: create a Set version of this ctor

### RussianAnalyzer

    public RussianAnalyzer(java.util.Map stopwords)

  Deprecated. Use `RussianAnalyzer(Version, Map)` instead.

  Builds an analyzer with the given stop words. TODO: create a Set version of this ctor

### RussianAnalyzer

    public RussianAnalyzer(org.apache.lucene.util.Version matchVersion,
                           java.util.Map stopwords)

  Builds an analyzer with the given stop words. TODO: create a Set version of this ctor

Method Detail

### tokenStream

    public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                              java.io.Reader reader)

  Creates a `TokenStream` which tokenizes all the text in the provided `Reader`.

  Specified by:
    `tokenStream` in class `org.apache.lucene.analysis.Analyzer`
  Returns:
    A `TokenStream` built from a `RussianLetterTokenizer` filtered with `RussianLowerCaseFilter`, `StopFilter`, and `RussianStemFilter`

### reusableTokenStream

    public org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName,
                                                                      java.io.Reader reader)
                                                               throws java.io.IOException

  Returns a (possibly reused) `TokenStream` which tokenizes all the text in the provided `Reader`.

  Overrides:
    `reusableTokenStream` in class `org.apache.lucene.analysis.Analyzer`
  Returns:
    A `TokenStream` built from a `RussianLetterTokenizer` filtered with `RussianLowerCaseFilter`, `StopFilter`, and `RussianStemFilter`
  Throws:
    `java.io.IOException`

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.