Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
Emits the entire input as a single token. More...
Inherits Lucene.Net.Analysis.Tokenizer.
Public Member Functions | |
KeywordTokenizer (System.IO.TextReader input) | |
KeywordTokenizer (System.IO.TextReader input, int bufferSize) | |
KeywordTokenizer (AttributeSource source, System.IO.TextReader input, int bufferSize) | |
KeywordTokenizer (AttributeFactory factory, System.IO.TextReader input, int bufferSize) | |
override bool | IncrementToken () |
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate Util.Attributes with the attributes of the next token. | |
override void | End () |
This method is called by the consumer after the last token has been consumed, after IncrementToken returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature. This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used. | |
override void | Reset (System.IO.TextReader input) |
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer. | |
Additional Inherited Members | |
Protected Member Functions inherited from Lucene.Net.Analysis.Tokenizer | |
override void | Dispose (bool disposing) |
Properties inherited from Lucene.Net.Util.AttributeSource | |
virtual AttributeFactory | Factory [get] |
Returns the used AttributeFactory. | |
virtual bool | HasAttributes [get] |
Returns true, iff this AttributeSource has any attributes | |
Emits the entire input as a single token.
Definition at line 25 of file KeywordTokenizer.cs.
Lucene.Net.Analysis.KeywordTokenizer.KeywordTokenizer | ( | System.IO.TextReader | input | ) |
Definition at line 35 of file KeywordTokenizer.cs.
Lucene.Net.Analysis.KeywordTokenizer.KeywordTokenizer | ( | System.IO.TextReader | input, |
int | bufferSize | ||
) |
Definition at line 39 of file KeywordTokenizer.cs.
Lucene.Net.Analysis.KeywordTokenizer.KeywordTokenizer | ( | AttributeSource | source, |
System.IO.TextReader | input, | ||
int | bufferSize | ||
) |
Definition at line 44 of file KeywordTokenizer.cs.
Lucene.Net.Analysis.KeywordTokenizer.KeywordTokenizer | ( | AttributeFactory | factory, |
System.IO.TextReader | input, | ||
int | bufferSize | ||
) |
Definition at line 49 of file KeywordTokenizer.cs.
|
virtual |
This method is called by the consumer after the last token has been consumed, after IncrementToken returned false
(using the new TokenStream
API). Streams implementing the old API should upgrade to use this feature. This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.
<throws> IOException </throws>
Reimplemented from Lucene.Net.Analysis.TokenStream.
Definition at line 87 of file KeywordTokenizer.cs.
|
virtual |
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate Util.Attributes 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 AttributeSource.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 AttributeSource.AddAttribute{T}() and AttributeSource.GetAttribute{T}(), references to all Util.Attributes 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 IncrementToken().
Implements Lucene.Net.Analysis.TokenStream.
Definition at line 62 of file KeywordTokenizer.cs.
|
virtual |
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.
Reimplemented from Lucene.Net.Analysis.Tokenizer.
Definition at line 93 of file KeywordTokenizer.cs.