Class LimitTokenOffsetFilterFactory
java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
org.apache.lucene.analysis.TokenFilterFactory
org.apache.lucene.analysis.miscellaneous.LimitTokenOffsetFilterFactory
Factory for
LimitTokenOffsetFilter.
<fieldType name="text_limit_pos" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LimitTokenOffsetFilter" maxStartOffset="100000" consumeAllTokens="false" />
</analyzer>
</fieldType>
The consumeAllTokens property is optional and defaults to false.
- Since:
- 5.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate booleanstatic final Stringprivate intstatic final StringSPI nameFields inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion -
Constructor Summary
ConstructorsConstructorDescriptionDefault ctor for compatibility with SPI -
Method Summary
Modifier and TypeMethodDescriptioncreate(TokenStream input) Transform the specified input TokenStreamMethods inherited from class org.apache.lucene.analysis.TokenFilterFactory
availableTokenFilters, findSPIName, forName, lookupClass, normalize, reloadTokenFiltersMethods inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
defaultCtorException, get, get, get, get, get, getBoolean, getChar, getClassArg, getFloat, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSet, getSnowballWordSet, getWordSet, isExplicitLuceneMatchVersion, require, require, require, requireBoolean, requireChar, requireFloat, requireInt, setExplicitLuceneMatchVersion, splitAt, splitFileNames
-
Field Details
-
NAME
SPI name- See Also:
-
MAX_START_OFFSET
- See Also:
-
CONSUME_ALL_TOKENS_KEY
- See Also:
-
maxStartOffset
private int maxStartOffset -
consumeAllTokens
private boolean consumeAllTokens
-
-
Constructor Details
-
LimitTokenOffsetFilterFactory
-
LimitTokenOffsetFilterFactory
public LimitTokenOffsetFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
create
Description copied from class:TokenFilterFactoryTransform the specified input TokenStream- Specified by:
createin classTokenFilterFactory
-