Class ManagedStopFilterFactory
java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
org.apache.lucene.analysis.TokenFilterFactory
org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory
org.apache.solr.rest.schema.analysis.ManagedStopFilterFactory
- All Implemented Interfaces:
org.apache.lucene.util.ResourceLoaderAware,ManagedResourceObserver
TokenFilterFactory that uses the ManagedWordSetResource implementation for managing stop words
using the REST API.
- Since:
- 4.8.0
- SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).
- "managedStop"
-
Field Summary
FieldsFields inherited from class org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory
handleFields inherited from class org.apache.lucene.analysis.AbstractAnalysisFactory
LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion -
Constructor Summary
ConstructorsConstructorDescriptionDefault ctor for compatibility with SPIManagedStopFilterFactory(Map<String, String> args) Initialize the managed "handle" -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.analysis.TokenStreamcreate(org.apache.lucene.analysis.TokenStream input) Returns a StopFilter based on our managed stop word set.protected Class<? extends ManagedResource> Returns the implementation class for managing stop words.This analysis component knows the most logical "path" for which to manage stop words from.voidonManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> args, ManagedResource res) Callback invoked by theManagedResourceinstance to trigger this class to create the CharArraySet used to create the StopFilter using the wordset managed byManagedWordSetResource.Methods inherited from class org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory
informMethods 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
-
ManagedStopFilterFactory
Initialize the managed "handle" -
ManagedStopFilterFactory
public ManagedStopFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
getResourceId
This analysis component knows the most logical "path" for which to manage stop words from.- Specified by:
getResourceIdin classBaseManagedTokenFilterFactory
-
getManagedResourceImplClass
Returns the implementation class for managing stop words.- Specified by:
getManagedResourceImplClassin classBaseManagedTokenFilterFactory
-
onManagedResourceInitialized
public void onManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> args, ManagedResource res) throws org.apache.solr.common.SolrException Callback invoked by theManagedResourceinstance to trigger this class to create the CharArraySet used to create the StopFilter using the wordset managed byManagedWordSetResource. Keep in mind that a schema.xml may reuse the sameManagedStopFilterFactorymany times for different field types; behind the scenes all instances of this class/handle combination share the same managed data, hence the need for a listener/callback scheme.- Throws:
org.apache.solr.common.SolrException
-
create
public org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream input) Returns a StopFilter based on our managed stop word set.- Specified by:
createin classorg.apache.lucene.analysis.TokenFilterFactory
-