TokenFilter (Lucene 3.6.2 API)
Keywords: org.apache.lucene.analysis.TokenFilter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.analysis
Class TokenFilter

    java.lang.Object
      org.apache.lucene.util.AttributeSource
          org.apache.lucene.analysis.TokenStream
              org.apache.lucene.analysis.TokenFilter

All Implemented Interfaces:
  Closeable

Direct Known Subclasses:
  ArabicNormalizationFilter, ArabicStemFilter, ASCIIFoldingFilter, BeiderMorseFilter, BrazilianStemFilter, BulgarianStemFilter, CachingTokenFilter, CategoryParentsStream, CategoryTokenizerBase, ChineseFilter, CJKBigramFilter, CJKWidthFilter, ClassicFilter, CollationKeyFilter, CompoundWordTokenFilterBase, CzechStemFilter, DelimitedPayloadTokenFilter, DoubleMetaphoneFilter, DutchStemFilter, EdgeNGramTokenFilter, ElisionFilter, EnglishMinimalStemFilter, EnglishPossessiveFilter, FilteringTokenFilter, FinnishLightStemFilter, FrenchLightStemFilter, FrenchMinimalStemFilter, FrenchStemFilter, GalicianMinimalStemFilter, GalicianStemFilter, GermanLightStemFilter, GermanMinimalStemFilter, GermanNormalizationFilter, GermanStemFilter, GreekLowerCaseFilter, GreekStemFilter, HindiNormalizationFilter, HindiStemFilter, HungarianLightStemFilter, HunspellStemFilter, ICUCollationKeyFilter, ICUNormalizer2Filter, ICUTransformFilter, IndicNormalizationFilter, IndonesianStemFilter, IrishLowerCaseFilter, ISOLatin1AccentFilter, ItalianLightStemFilter, JapaneseBaseFormFilter, JapaneseKatakanaStemFilter, JapaneseReadingFormFilter, KeywordMarkerFilter, KStemFilter, LatvianStemFilter, LimitTokenCountFilter, LookaheadTokenFilter, LowerCaseFilter, MockFixedLengthPayloadFilter, MockHoleInjectingTokenFilter, MockVariableLengthPayloadFilter, NGramTokenFilter, NorwegianLightStemFilter, NorwegianMinimalStemFilter, NumericPayloadTokenFilter, OffsetLimitTokenFilter, PersianNormalizationFilter, PhoneticFilter, PorterStemFilter, PortugueseLightStemFilter, PortugueseMinimalStemFilter, PortugueseStemFilter, PositionFilter, QueryParserTestBase.QPTestFilter, ReverseStringFilter, RussianLightStemFilter, RussianLowerCaseFilter, RussianStemFilter, ShingleFilter, SnowballFilter, SpanishLightStemFilter, StandardFilter, StemmerOverrideFilter, StempelFilter, SwedishLightStemFilter, SynonymFilter, TeeSinkTokenFilter, ThaiWordFilter, TokenOffsetPayloadTokenFilter, TurkishLowerCaseFilter, TypeAsPayloadTokenFilter, ValidatingTokenFilter, WordTokenFilter

    public abstract class TokenFilter

extends TokenStream

A TokenFilter is a TokenStream whose input is another TokenStream.

This is an abstract class; subclasses must override `TokenStream.incrementToken()`.

See Also:
  `TokenStream`

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
`AttributeSource.AttributeFactory, AttributeSource.State`

Field Summary
`protected TokenStream` | `input` The source of tokens for this filter.

Constructor Summary
`protected` | `TokenFilter(TokenStream input)` Construct a token stream filtering the given input.

Method Summary
`void` | `close()` Close the input TokenStream.
`void` | `end()` Performs end-of-stream operations, if any, and calls then `end()` on the input TokenStream. NOTE: Be sure to call `super.end()` first when overriding this method.
`void` | `reset()` Reset the filter as well as the input TokenStream.

Methods inherited from class org.apache.lucene.analysis.TokenStream
`incrementToken`

Methods inherited from class org.apache.lucene.util.AttributeSource
`addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString`

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

Field Detail

### input

    protected final TokenStream input

  The source of tokens for this filter.

Constructor Detail

### TokenFilter

    protected TokenFilter(TokenStream input)

  Construct a token stream filtering the given input.

Method Detail

### end

    public void end()
             throws IOException

  Performs end-of-stream operations, if any, and calls then `end()` on the input TokenStream.

  NOTE: Be sure to call `super.end()` first when overriding this method.

  Overrides:
    `end` in class `TokenStream`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Close the input TokenStream.

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `TokenStream`
  Throws:
    `IOException`

### reset

    public void reset()
               throws IOException

  Reset the filter as well as the input TokenStream.

  Overrides:
    `reset` in class `TokenStream`
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD