Class TokenFilterFactory
Abstract parent class for analysis factories that create Lucene.Net.Analysis.TokenFilter instances.
Inheritance
Inherited Members
Namespace: Lucene.Net.Analysis.Util
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public abstract class TokenFilterFactory : AbstractAnalysisFactory
Constructors
TokenFilterFactory(IDictionary<string, string>)
Initialize this factory via a set of key-value pairs.
Declaration
protected TokenFilterFactory(IDictionary<string, string> args)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<string, string> | args |
Properties
AvailableTokenFilters
returns a list of all available tokenfilter names from the host project's referenced assemblies
Declaration
public static ICollection<string> AvailableTokenFilters { get; }
Property Value
Type | Description |
---|---|
ICollection<string> |
Methods
Create(TokenStream)
Transform the specified input Lucene.Net.Analysis.TokenStream
Declaration
public abstract TokenStream Create(TokenStream input)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input |
Returns
Type | Description |
---|---|
TokenStream |
ForName(string, IDictionary<string, string>)
looks up a tokenfilter by name from the host project's referenced assemblies
Declaration
public static TokenFilterFactory ForName(string name, IDictionary<string, string> args)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
IDictionary<string, string> | args |
Returns
Type | Description |
---|---|
TokenFilterFactory |
LookupClass(string)
looks up a tokenfilter class by name from the host project's referenced assemblies
Declaration
public static Type LookupClass(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
Type |
ReloadTokenFilters()
Reloads the factory list. 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!
Declaration
public static void ReloadTokenFilters()