C# Class org.apache.lucene.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 org.apache.lucene.analysis.tokenattributes.

Inheritance: TokenStream
显示文件 Open project: paulirwin/lucene.net Class Usage Examples

Private Properties

Property Type Description
getNextPrefixInputToken Token
getNextSuffixInputToken Token

Public Methods

Method Description
PrefixAwareTokenFilter ( TokenStream prefix, TokenStream suffix )
close ( ) : void
end ( ) : void
incrementToken ( ) : bool
reset ( ) : void
updateSuffixToken ( Token suffixToken, Token lastPrefixToken ) : Token

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

Private Methods

Method Description
getNextPrefixInputToken ( Token token ) : Token
getNextSuffixInputToken ( Token token ) : Token

Method Details

PrefixAwareTokenFilter() public method

public PrefixAwareTokenFilter ( TokenStream prefix, TokenStream suffix )
prefix TokenStream
suffix TokenStream

close() public method

public close ( ) : void
return void

end() public method

public end ( ) : void
return void

incrementToken() public method

public incrementToken ( ) : bool
return bool

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 ( Token suffixToken, Token lastPrefixToken ) : Token
suffixToken Token a token from the suffix stream
lastPrefixToken Token the last token from the prefix stream
return Token