public final class TokenizerChain extends SolrAnalyzer
CustomAnalyzer
.Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
Constructor and Description |
---|
TokenizerChain(CharFilterFactory[] charFilters,
TokenizerFactory tokenizer,
TokenFilterFactory[] filters)
Creates a new TokenizerChain.
|
TokenizerChain(CustomAnalyzer customAnalyzer)
Copy from CustomAnalyzer.
|
TokenizerChain(TokenizerFactory tokenizer,
TokenFilterFactory[] filters)
Creates a new TokenizerChain w/o any CharFilterFactories.
|
Modifier and Type | Method and Description |
---|---|
protected Analyzer.TokenStreamComponents |
createComponents(String fieldName) |
CharFilterFactory[] |
getCharFilterFactories() |
Analyzer |
getMultiTermAnalyzer() |
TokenFilterFactory[] |
getTokenFilterFactories() |
TokenizerFactory |
getTokenizerFactory() |
Reader |
initReader(String fieldName,
Reader reader) |
protected Reader |
initReaderForNormalization(String fieldName,
Reader reader) |
protected TokenStream |
normalize(String fieldName,
TokenStream in) |
String |
toString() |
getPositionIncrementGap, setPositionIncrementGap
attributeFactory, close, getOffsetGap, getReuseStrategy, getVersion, normalize, setVersion, tokenStream, tokenStream
public TokenizerChain(CustomAnalyzer customAnalyzer)
public TokenizerChain(TokenizerFactory tokenizer, TokenFilterFactory[] filters)
tokenizer
- Factory for the Tokenizer to use, must not be null.filters
- Factories for the TokenFilters to use - if null, will be treated as if empty.public TokenizerChain(CharFilterFactory[] charFilters, TokenizerFactory tokenizer, TokenFilterFactory[] filters)
charFilters
- Factories for the CharFilters to use, if any - if null, will be treated as if empty.tokenizer
- Factory for the Tokenizer to use, must not be null.filters
- Factories for the TokenFilters to use if any- if null, will be treated as if empty.public CharFilterFactory[] getCharFilterFactories()
public TokenizerFactory getTokenizerFactory()
public TokenFilterFactory[] getTokenFilterFactories()
public Reader initReader(String fieldName, Reader reader)
initReader
in class SolrAnalyzer
protected Reader initReaderForNormalization(String fieldName, Reader reader)
initReaderForNormalization
in class Analyzer
protected Analyzer.TokenStreamComponents createComponents(String fieldName)
createComponents
in class Analyzer
protected TokenStream normalize(String fieldName, TokenStream in)
public Analyzer getMultiTermAnalyzer()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.