
- Lucene - Home
- Lucene - Overview
- Lucene - Environment Setup
- Lucene - First Application
- Lucene - Indexing Classes
- Lucene - Searching Classes
- Lucene - Indexing Process
- Lucene - Search Operation
- Lucene - Sorting
Lucene - Indexing Operations
- Lucene - Indexing Operations
- Lucene - Add Document
- Lucene - Update Document
- Lucene - Delete Document
- Lucene - Field Options
Lucene - Query Programming
- Lucene - Query Programming
- Lucene - TermQuery
- Lucene - TermRangeQuery
- Lucene - PrefixQuery
- Lucene - BooleanQuery
- Lucene - PhraseQuery
- Lucene - WildCardQuery
- Lucene - FuzzyQuery
- Lucene - MatchAllDocsQuery
- Lucene - MatchNoDocsQuery
- Lucene - RegexpQuery
Lucene - Analysis
- Lucene - Analysis
- Lucene - WhitespaceAnalyzer
- Lucene - SimpleAnalyzer
- Lucene - StopAnalyzer
- Lucene - StandardAnalyzer
- Lucene - KeywordAnalyzer
- Lucene - CustomAnalyzer
- Lucene - EnglishAnalyzer
- Lucene - FrenchAnalyzer
- Lucene - SpanishAnalyzer
Lucene - Resources
Lucene - TokenStream Class
TokenStream class is an output of the analysis process and it comprises of a series of tokens. It is an abstract class.
Class Declaration
Following is the declaration for org.apache.lucene.analysis.TokenStream class −
public abstract class TokenStream extends AttributeSource implements Closeable
Class Fields
S.No. | Field & Description |
---|---|
1 |
static final AttributeFactory DEFAULT_TOKEN_ATTRIBUTE_FACTORY Default AttributeFactory instance that should be used for TokenStreams. |
Class Constructors
S.No. | Constructor & Description |
---|---|
1 |
protected TokenStream() A TokenStream using the default attribute factory. |
2 |
protected TokenStream(AttributeFactory factory) A TokenStream using the supplied AttributeFactory for creating new Attribute instances. |
3 |
protected TokenStream(AttributeSource input) A TokenStream that uses the same attributes as the supplied one. |
Class Methods
S.No. | Method & Description |
---|---|
1 |
void close() Releases resources associated with this stream. |
2 |
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). |
3 |
abstract boolean incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. |
4 |
void reset() This method is called by a consumer before it begins consumption using incrementToken(). |
Methods Inherited
This class inherits methods from the following classes −
- org.apache.lucene.util.AttributeSource
- java.lang.Object