Class AnalyzerWrapper
Extension to Analyzer suitable for Analyzers which wrap other Analyzers.
GetWrappedAnalyzer(String) allows the Analyzer to wrap multiple Analyzers which are selected on a per field basis.
WrapComponents(String, TokenStreamComponents) allows the TokenStreamComponents of the wrapped Analyzer to then be wrapped (such as adding a new TokenFilter to form new TokenStreamComponents).
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class AnalyzerWrapper : Analyzer
Constructors
Name | Description |
---|---|
AnalyzerWrapper() | Creates a new AnalyzerWrapper. Since the ReuseStrategy of the wrapped Analyzers are unknown, PER_FIELD_REUSE_STRATEGY is assumed. |
AnalyzerWrapper(ReuseStrategy) | Creates a new AnalyzerWrapper with the given reuse strategy. If you want to wrap a single delegate Analyzer you can probably
reuse its strategy when instantiating this subclass:
If you choose different analyzers per field, use PER_FIELD_REUSE_STRATEGY. |
Methods
Name | Description |
---|---|
CreateComponents(String, TextReader) | |
GetOffsetGap(String) | |
GetPositionIncrementGap(String) | |
GetWrappedAnalyzer(String) | Retrieves the wrapped Analyzer appropriate for analyzing the field with the given name |
InitReader(String, TextReader) | |
WrapComponents(String, TokenStreamComponents) | Wraps / alters the given TokenStreamComponents, taken from the wrapped Analyzer, to form new components. It is through this method that new TokenFilters can be added by AnalyzerWrappers. By default, the given components are returned. |
WrapReader(String, TextReader) | Wraps / alters the given |