org.elasticsearch.index.analysis
Class CustomAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.elasticsearch.index.analysis.CustomAnalyzer
- All Implemented Interfaces:
- java.io.Closeable, PositionIncrementGapAnalyzer
public class CustomAnalyzer
- extends org.apache.lucene.analysis.Analyzer
- implements PositionIncrementGapAnalyzer
Fields inherited from class org.apache.lucene.analysis.Analyzer |
overridesTokenStreamMethod |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
close, getOffsetGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomAnalyzer
public CustomAnalyzer(TokenizerFactory tokenizerFactory,
CharFilterFactory[] charFilters,
TokenFilterFactory[] tokenFilters)
setPositionIncrementGap
public void setPositionIncrementGap(int positionIncrementGap)
- Specified by:
setPositionIncrementGap
in interface PositionIncrementGapAnalyzer
tokenizerFactory
public TokenizerFactory tokenizerFactory()
tokenFilters
public TokenFilterFactory[] tokenFilters()
charFilters
public CharFilterFactory[] charFilters()
getPositionIncrementGap
public int getPositionIncrementGap(java.lang.String fieldName)
- Overrides:
getPositionIncrementGap
in class org.apache.lucene.analysis.Analyzer
tokenStream
public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
java.io.Reader reader)
- Specified by:
tokenStream
in class org.apache.lucene.analysis.Analyzer
reusableTokenStream
public org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName,
java.io.Reader reader)
throws java.io.IOException
- Overrides:
reusableTokenStream
in class org.apache.lucene.analysis.Analyzer
- Throws:
java.io.IOException