C# Class Lucene.Net.Analysis.Miscellaneous.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 Attributes, i.e. Attributes other than the ones located in Lucene.Net.Analysis.TokenAttributes.

Inheritance: Lucene.Net.Analysis.TokenStream
Datei anzeigen Open project: apache/lucenenet Class Usage Examples

Private Properties

Property Type Description
GetNextPrefixInputToken Lucene.Net.Analysis.Token
GetNextSuffixInputToken Lucene.Net.Analysis.Token

Public Methods

Method Description
Dispose ( ) : void
End ( ) : void
IncrementToken ( ) : bool
PrefixAwareTokenFilter ( TokenStream prefix, TokenStream suffix ) : Lucene.Net.Analysis.Tokenattributes
Reset ( ) : void
UpdateSuffixToken ( Lucene.Net.Analysis.Token suffixToken, Lucene.Net.Analysis.Token lastPrefixToken ) : Lucene.Net.Analysis.Token

The default implementation adds last prefix token end offset to the suffix token start and end offsets.

Private Methods

Method Description
GetNextPrefixInputToken ( Lucene.Net.Analysis.Token token ) : Lucene.Net.Analysis.Token
GetNextSuffixInputToken ( Lucene.Net.Analysis.Token token ) : Lucene.Net.Analysis.Token

Method Details

Dispose() public method

public Dispose ( ) : void
return void

End() public method

public End ( ) : void
return void

IncrementToken() public final method

public final IncrementToken ( ) : bool
return bool

PrefixAwareTokenFilter() public method

public PrefixAwareTokenFilter ( TokenStream prefix, TokenStream suffix ) : Lucene.Net.Analysis.Tokenattributes
prefix Lucene.Net.Analysis.TokenStream
suffix Lucene.Net.Analysis.TokenStream
return Lucene.Net.Analysis.Tokenattributes

Reset() public method

public Reset ( ) : void
return void

UpdateSuffixToken() public method

The default implementation adds last prefix token end offset to the suffix token start and end offsets.
public UpdateSuffixToken ( Lucene.Net.Analysis.Token suffixToken, Lucene.Net.Analysis.Token lastPrefixToken ) : Lucene.Net.Analysis.Token
suffixToken Lucene.Net.Analysis.Token a token from the suffix stream
lastPrefixToken Lucene.Net.Analysis.Token the last token from the prefix stream
return Lucene.Net.Analysis.Token