Class AnalyzerWrapper
Extension to Analyzer suitable for Analyzers which wrap other Analyzers.
Get
Wrap
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
public abstract class AnalyzerWrapper : Analyzer
Constructors
| Improve this Doc View SourceAnalyzerWrapper()
Creates a new Analyzer
Declaration
protected AnalyzerWrapper()
AnalyzerWrapper(ReuseStrategy)
Creates a new Analyzer
If you want to wrap a single delegate Analyzer you can probably
reuse its strategy when instantiating this subclass:
base(innerAnalyzer.Strategy)
.
If you choose different analyzers per field, use PER_FIELD_REUSE_STRATEGY.
Declaration
protected AnalyzerWrapper(ReuseStrategy reuseStrategy)
Parameters
Type | Name | Description |
---|---|---|
Reuse |
reuseStrategy |
See Also
Methods
| Improve this Doc View SourceCreateComponents(String, TextReader)
Declaration
protected override sealed TokenStreamComponents CreateComponents(string fieldName, TextReader aReader)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | |
Text |
aReader |
Returns
Type | Description |
---|---|
Token |
Overrides
| Improve this Doc View SourceGetOffsetGap(String)
Declaration
public override int GetOffsetGap(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName |
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGetPositionIncrementGap(String)
Declaration
public override int GetPositionIncrementGap(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName |
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGetWrappedAnalyzer(String)
Retrieves the wrapped Analyzer appropriate for analyzing the field with the given name
Declaration
protected abstract Analyzer GetWrappedAnalyzer(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | Name of the field which is to be analyzed |
Returns
| Improve this Doc View SourceInitReader(String, TextReader)
Declaration
protected override TextReader InitReader(string fieldName, TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | |
Text |
reader |
Returns
Type | Description |
---|---|
Text |
Overrides
| Improve this Doc View SourceWrapComponents(String, TokenStreamComponents)
Wraps / alters the given Token
Declaration
protected virtual TokenStreamComponents WrapComponents(string fieldName, TokenStreamComponents components)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | Name of the field which is to be analyzed |
Token |
components | Token |
Returns
Type | Description |
---|---|
Token |
Wrapped / altered Token |
WrapReader(String, TextReader)
Wraps / alters the given
Declaration
protected virtual TextReader WrapReader(string fieldName, TextReader reader)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | name of the field which is to be analyzed |
Text |
reader | the reader to wrap |
Returns
Type | Description |
---|---|
Text |
the wrapped reader |