|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.analysis.Analyzer
public abstract class Analyzer
An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index terms from text.
Typical implementations first build a Tokenizer, which breaks the stream of characters from the Reader into raw Tokens. One or more TokenFilters may then be applied to the output of the Tokenizer.
WARNING: You must override one of the methods defined by this class in your subclass or the Analyzer will enter an infinite loop.
Constructor Summary | |
---|---|
Analyzer()
|
Method Summary | |
---|---|
int |
getPositionIncrementGap(String fieldName)
Invoked before indexing a Field instance if terms have already been added to that field. |
TokenStream |
tokenStream(Reader reader)
Deprecated. use tokenStream(String, Reader) instead. |
TokenStream |
tokenStream(String fieldName,
Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Analyzer()
Method Detail |
---|
public TokenStream tokenStream(String fieldName, Reader reader)
public TokenStream tokenStream(Reader reader)
tokenStream(String, Reader)
public int getPositionIncrementGap(String fieldName)
fieldName
- Field name being indexed.
tokenStream(String,Reader)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |