org.apache.lucene.analysis.util

## Class TokenFilterFactory

- java.lang.Object
- - org.apache.lucene.analysis.util.AbstractAnalysisFactory
  - - org.apache.lucene.analysis.util.TokenFilterFactory

- Direct Known Subclasses:
    ArabicNormalizationFilterFactory, ArabicStemFilterFactory, ASCIIFoldingFilterFactory, BrazilianStemFilterFactory, BulgarianStemFilterFactory, CapitalizationFilterFactory, ChineseFilterFactory, CJKBigramFilterFactory, CJKWidthFilterFactory, ClassicFilterFactory, CollationKeyFilterFactory, CommonGramsFilterFactory, CommonGramsQueryFilterFactory, CzechStemFilterFactory, DelimitedPayloadTokenFilterFactory, DictionaryCompoundWordTokenFilterFactory, EdgeNGramFilterFactory, ElisionFilterFactory, EnglishMinimalStemFilterFactory, EnglishPossessiveFilterFactory, FinnishLightStemFilterFactory, FrenchLightStemFilterFactory, FrenchMinimalStemFilterFactory, GalicianMinimalStemFilterFactory, GalicianStemFilterFactory, GermanLightStemFilterFactory, GermanMinimalStemFilterFactory, GermanNormalizationFilterFactory, GermanStemFilterFactory, GreekLowerCaseFilterFactory, GreekStemFilterFactory, HindiNormalizationFilterFactory, HindiStemFilterFactory, HungarianLightStemFilterFactory, HunspellStemFilterFactory, HyphenatedWordsFilterFactory, HyphenationCompoundWordTokenFilterFactory, IndicNormalizationFilterFactory, IndonesianStemFilterFactory, IrishLowerCaseFilterFactory, ItalianLightStemFilterFactory, KeepWordFilterFactory, KeywordMarkerFilterFactory, KStemFilterFactory, LatvianStemFilterFactory, LengthFilterFactory, LimitTokenCountFilterFactory, LowerCaseFilterFactory, NGramFilterFactory, NorwegianLightStemFilterFactory, NorwegianMinimalStemFilterFactory, NumericPayloadTokenFilterFactory, PatternReplaceFilterFactory, PersianNormalizationFilterFactory, PorterStemFilterFactory, PortugueseLightStemFilterFactory, PortugueseMinimalStemFilterFactory, PortugueseStemFilterFactory, PositionFilterFactory, RemoveDuplicatesTokenFilterFactory, ReverseStringFilterFactory, RussianLightStemFilterFactory, ShingleFilterFactory, SnowballPorterFilterFactory, SpanishLightStemFilterFactory, StandardFilterFactory, StemmerOverrideFilterFactory, StopFilterFactory, SwedishLightStemFilterFactory, SynonymFilterFactory, ThaiWordFilterFactory, TokenOffsetPayloadTokenFilterFactory, TrimFilterFactory, TurkishLowerCaseFilterFactory, TypeAsPayloadTokenFilterFactory, TypeTokenFilterFactory, WordDelimiterFilterFactory

      public abstract class TokenFilterFactory
      extends AbstractAnalysisFactory

  Abstract parent class for analysis factories that create `TokenFilter` instances.

- - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `args, luceneMatchVersion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenFilterFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Set<String>` | `availableTokenFilters()` returns a list of all available tokenfilter names from context classpath
    `abstract TokenStream` | `create(TokenStream input)` Transform the specified input TokenStream
    `static TokenFilterFactory` | `forName(String name)` looks up a tokenfilter by name from context classpath
    `static Class<? extends TokenFilterFactory>` | `lookupClass(String name)` looks up a tokenfilter class by name from context classpath
    `static void` | `reloadTokenFilters(ClassLoader classloader)` Reloads the factory list from the given `ClassLoader`.

    - ### Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSnowballWordSet, getWordSet, init, setLuceneMatchVersion, splitFileNames`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TokenFilterFactory

          public TokenFilterFactory()

  - ### Method Detail

    - #### forName

          public static TokenFilterFactory forName(String name)

      looks up a tokenfilter by name from context classpath

    - #### lookupClass

          public static Class<? extends TokenFilterFactory> lookupClass(String name)

      looks up a tokenfilter class by name from context classpath

    - #### availableTokenFilters

          public static Set<String> availableTokenFilters()

      returns a list of all available tokenfilter names from context classpath

    - #### reloadTokenFilters

          public static void reloadTokenFilters(ClassLoader classloader)

      Reloads the factory list from the given `ClassLoader`. Changes to the factories are visible after the method ends, all iterators (`availableTokenFilters()`,...) stay consistent.

      NOTE: Only new factories are added, existing ones are never removed or replaced.

      This method is expensive and should only be called for discovery of new factories on the given classpath/classloader!

    - #### create

          public abstract TokenStream create(TokenStream input)

      Transform the specified input TokenStream

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