Class BaseManagedTokenFilterFactory
java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
org.apache.lucene.analysis.TokenFilterFactory
org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory
- All Implemented Interfaces:
org.apache.lucene.util.ResourceLoaderAware,ManagedResourceObserver
- Direct Known Subclasses:
ManagedStopFilterFactory,ManagedSynonymGraphFilterFactory
public abstract class BaseManagedTokenFilterFactory
extends org.apache.lucene.analysis.TokenFilterFactory
implements org.apache.lucene.util.ResourceLoaderAware, ManagedResourceObserver
Abstract based class for implementing TokenFilterFactory objects that are managed by the REST
API. Specifically, this base class is useful for token filters that have configuration and data
that needs to be updated programmatically, such as to support a UI for adding synonyms.
- Since:
- 4.8.0
-
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 TypeMethodDescriptionprotected abstract Class<? extends ManagedResource> Let the concrete analysis component determine the ManagedResource implementation.protected abstract StringLet the concrete analysis component decide the path it wishes to be managed at.voidinform(org.apache.lucene.util.ResourceLoader loader) Registers an endpoint with the RestManager so that this component can be managed using the REST API.Methods inherited from class org.apache.lucene.analysis.TokenFilterFactory
availableTokenFilters, create, 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, splitFileNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.rest.ManagedResourceObserver
onManagedResourceInitialized
-
Field Details
-
handle
-
-
Constructor Details
-
BaseManagedTokenFilterFactory
-
BaseManagedTokenFilterFactory
public BaseManagedTokenFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
inform
Registers an endpoint with the RestManager so that this component can be managed using the REST API. This method can be invoked before all the resources theRestManagerneeds to initialize aManagedResourceare available, so this simply registers the need to be managed at a specific endpoint and lets the RestManager deal with initialization when ready.- Specified by:
informin interfaceorg.apache.lucene.util.ResourceLoaderAware- Throws:
IOException
-
getResourceId
Let the concrete analysis component decide the path it wishes to be managed at. -
getManagedResourceImplClass
Let the concrete analysis component determine the ManagedResource implementation. As there can be many instances of the same analysis component in a schema, this class should not presume to create ManagedResource. For instance, there may be 10 instances of the ManagedStopFilterFactory that use the same set of English stop words and we don't want 10 copies of the ManagedWordSetResource in the same core.
-