Consumers (i.e., {@link IndexWriter}) use this method to advance the stream to
the next token. Implementing classes must implement this method and update
the appropriate {@link AttributeImpl}s with the attributes of the next
token.
The producer must make no assumptions about the attributes after the
method has been returned: the caller may arbitrarily change it. If the
producer needs to preserve the state for subsequent calls, it can use
{@link #captureState} to create a copy of the current attribute state.
This method is called for every token of a document, so an efficient
implementation is crucial for good performance. To avoid calls to
{@link #AddAttribute(Class)} and {@link #GetAttribute(Class)} or downcasts,
references to all {@link AttributeImpl}s that this stream uses should be
retrieved during instantiation.
To ensure that filters and consumers know which attributes are available,
the attributes must be added during instantiation. Filters and consumers
are not required to check for availability of attributes in
{@link #IncrementToken()}.
Namespace: Lucene.Net.AnalysisAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public virtual bool IncrementToken() |
Visual Basic |
---|
Public Overridable Function IncrementToken As Boolean |
Visual C++ |
---|
public:
virtual bool IncrementToken() |
Return Value
false for end of stream; true otherwise
Note that this method will be defined abstract in Lucene
3.0.
See Also