Class ConditionalTokenFilterFactory
java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
org.apache.lucene.analysis.TokenFilterFactory
org.apache.lucene.analysis.miscellaneous.ConditionalTokenFilterFactory
- All Implemented Interfaces:
ResourceLoaderAware
- Direct Known Subclasses:
ProtectedTermFilterFactory
public abstract class ConditionalTokenFilterFactory
extends TokenFilterFactory
implements ResourceLoaderAware
Abstract parent class for analysis factories that create
ConditionalTokenFilter instances- Since:
- 7.4.0
- SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).
- "conditional"
-
Field Summary
FieldsFields inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ctor for compatibility with SPIprotected -
Method Summary
Modifier and TypeMethodDescriptioncreate(TokenStream input) protected abstract ConditionalTokenFiltercreate(TokenStream input, Function<TokenStream, TokenStream> inner) Modify the incomingTokenStreamwith aConditionalTokenFilterprotected voiddoInform(ResourceLoader loader) Initialises this component with the correspondingResourceLoaderfinal voidinform(ResourceLoader loader) voidsetInnerFilters(List<TokenFilterFactory> innerFilters) Set the inner filter factories to produce theTokenFilters that will be wrapped by theConditionalTokenFilterMethods 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:
-
-
Constructor Details
-
ConditionalTokenFilterFactory
-
ConditionalTokenFilterFactory
public ConditionalTokenFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
setInnerFilters
Set the inner filter factories to produce theTokenFilters that will be wrapped by theConditionalTokenFilter -
create
- Specified by:
createin classTokenFilterFactory
-
inform
- Specified by:
informin interfaceResourceLoaderAware- Throws:
IOException
-
doInform
Initialises this component with the correspondingResourceLoader- Throws:
IOException
-
create
protected abstract ConditionalTokenFilter create(TokenStream input, Function<TokenStream, TokenStream> inner) Modify the incomingTokenStreamwith aConditionalTokenFilter
-