public final class LimitTokenCountAnalyzer extends AnalyzerWrapper
IndexWriter.LimitTokenCountFilterAnalyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponentsGLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY| Constructor and Description |
|---|
LimitTokenCountAnalyzer(Analyzer delegate,
int maxTokenCount)
Build an analyzer that limits the maximum number of tokens per field.
|
LimitTokenCountAnalyzer(Analyzer delegate,
int maxTokenCount,
boolean consumeAllTokens)
Build an analyzer that limits the maximum number of tokens per field.
|
| Modifier and Type | Method and Description |
|---|---|
String |
toString() |
getOffsetGap, getPositionIncrementGap, initReaderclose, getReuseStrategy, tokenStream, tokenStreampublic LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount)
public LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount, boolean consumeAllTokens)
delegate - the analyzer to wrapmaxTokenCount - max number of tokens to produceconsumeAllTokens - whether all tokens from the delegate should be consumed even if maxTokenCount is reached.Copyright © 2010 - 2020 Adobe. All Rights Reserved