public final class CustomAnalyzer
extends org.apache.lucene.analysis.Analyzer
Constructor and Description |
---|
CustomAnalyzer(TokenizerFactory tokenizerFactory,
CharFilterFactory[] charFilters,
TokenFilterFactory[] tokenFilters) |
CustomAnalyzer(TokenizerFactory tokenizerFactory,
CharFilterFactory[] charFilters,
TokenFilterFactory[] tokenFilters,
int positionIncrementGap,
int offsetGap) |
Modifier and Type | Method and Description |
---|---|
CharFilterFactory[] |
charFilters() |
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents |
createComponents(java.lang.String fieldName) |
int |
getOffsetGap(java.lang.String field) |
int |
getPositionIncrementGap(java.lang.String fieldName) |
protected java.io.Reader |
initReader(java.lang.String fieldName,
java.io.Reader reader) |
protected java.io.Reader |
initReaderForNormalization(java.lang.String fieldName,
java.io.Reader reader) |
protected org.apache.lucene.analysis.TokenStream |
normalize(java.lang.String fieldName,
org.apache.lucene.analysis.TokenStream in) |
TokenFilterFactory[] |
tokenFilters() |
TokenizerFactory |
tokenizerFactory() |
public CustomAnalyzer(TokenizerFactory tokenizerFactory, CharFilterFactory[] charFilters, TokenFilterFactory[] tokenFilters)
public CustomAnalyzer(TokenizerFactory tokenizerFactory, CharFilterFactory[] charFilters, TokenFilterFactory[] tokenFilters, int positionIncrementGap, int offsetGap)
public TokenizerFactory tokenizerFactory()
public TokenFilterFactory[] tokenFilters()
public CharFilterFactory[] charFilters()
public int getPositionIncrementGap(java.lang.String fieldName)
getPositionIncrementGap
in class org.apache.lucene.analysis.Analyzer
public int getOffsetGap(java.lang.String field)
getOffsetGap
in class org.apache.lucene.analysis.Analyzer
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(java.lang.String fieldName)
createComponents
in class org.apache.lucene.analysis.Analyzer
protected java.io.Reader initReader(java.lang.String fieldName, java.io.Reader reader)
initReader
in class org.apache.lucene.analysis.Analyzer
protected java.io.Reader initReaderForNormalization(java.lang.String fieldName, java.io.Reader reader)
initReaderForNormalization
in class org.apache.lucene.analysis.Analyzer
protected org.apache.lucene.analysis.TokenStream normalize(java.lang.String fieldName, org.apache.lucene.analysis.TokenStream in)
normalize
in class org.apache.lucene.analysis.Analyzer