Class CachingTokenFilter
This class can be used if the token attributes of a TokenStream are intended to be consumed more than once. It caches all token attribute states locally in a List.
CachingTokenFilter implements the optional method Reset(), which repositions the stream to the first Token.
Implements
IDisposable
Inherited Members
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.dll
Syntax
public sealed class CachingTokenFilter : TokenFilter, IDisposable
Constructors
| Improve this Doc View SourceCachingTokenFilter(TokenStream)
Create a new CachingTokenFilter around input
,
caching its token attributes, which can be replayed again
after a call to Reset().
Declaration
public CachingTokenFilter(TokenStream input)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input |
Methods
| Improve this Doc View SourceEnd()
Declaration
public override void End()
Overrides
| Improve this Doc View SourceIncrementToken()
Declaration
public override bool IncrementToken()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceReset()
Rewinds the iterator to the beginning of the cached list.
Note that this does not call Reset() on the wrapped tokenstream ever, even the first time. You should Reset() the inner tokenstream before wrapping it with CachingTokenFilter.
Declaration
public override void Reset()
Overrides
Implements
IDisposable