Class PrefixAwareTokenFilter
Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
NOTE: This filter might not behave correctly if used with custom IAttributes, i.e. IAttributes other than the ones located in Lucene.Net.Analysis.TokenAttributes.
Implements
IDisposable
Inherited Members
Namespace: Lucene.Net.Analysis.Miscellaneous
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class PrefixAwareTokenFilter : TokenStream, IDisposable
Constructors
| Improve this Doc View SourcePrefixAwareTokenFilter(TokenStream, TokenStream)
Declaration
public PrefixAwareTokenFilter(TokenStream prefix, TokenStream suffix)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenStream | prefix | |
| TokenStream | suffix |
Properties
| Improve this Doc View SourcePrefix
Declaration
public virtual TokenStream Prefix { get; set; }
Property Value
| Type | Description |
|---|---|
| TokenStream |
Suffix
Declaration
public virtual TokenStream Suffix { get; set; }
Property Value
| Type | Description |
|---|---|
| TokenStream |
Methods
| Improve this Doc View SourceDispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
End()
Declaration
public override void End()
Overrides
| Improve this Doc View SourceIncrementToken()
Declaration
public override sealed bool IncrementToken()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceReset()
Declaration
public override void Reset()
Overrides
| Improve this Doc View SourceUpdateSuffixToken(Token, Token)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
Declaration
public virtual Token UpdateSuffixToken(Token suffixToken, Token lastPrefixToken)
Parameters
| Type | Name | Description |
|---|---|---|
| Token | suffixToken | a token from the suffix stream |
| Token | lastPrefixToken | the last token from the prefix stream |
Returns
| Type | Description |
|---|---|
| Token | consumer token |
Implements
IDisposable