Class TypeTokenFilter

All Implemented Interfaces:
Closeable, AutoCloseable

public final class TypeTokenFilter extends FilteringTokenFilter
Removes tokens whose types appear in a set of blocked types from a token stream.
  • Constructor Details

    • TypeTokenFilter

      @Deprecated public TypeTokenFilter(Version version, boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes, boolean useWhiteList)
      Deprecated.
      enablePositionIncrements=false is not supported anymore as of Lucene 4.4.
    • TypeTokenFilter

      @Deprecated public TypeTokenFilter(Version version, boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes)
      Deprecated.
      enablePositionIncrements=false is not supported anymore as of Lucene 4.4.
    • TypeTokenFilter

      public TypeTokenFilter(Version version, TokenStream input, Set<String> stopTypes, boolean useWhiteList)
      Create a new TypeTokenFilter.
      Parameters:
      version - the Lucene match version
      input - the TokenStream to consume
      stopTypes - the types to filter
      useWhiteList - if true, then tokens whose type is in stopTypes will be kept, otherwise they will be filtered out
    • TypeTokenFilter

      public TypeTokenFilter(Version version, TokenStream input, Set<String> stopTypes)
      Create a new TypeTokenFilter that filters tokens out (useWhiteList=false).
      See Also: