Class ManagedSynonymGraphFilterFactory
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.ManagedSynonymGraphFilterFactory
- All Implemented Interfaces:
org.apache.lucene.util.ResourceLoaderAware,ManagedResourceObserver
TokenFilterFactory and ManagedResource implementation for doing CRUD on synonyms using the REST
API.
- Since:
- 7.0.0
- SPI Name (case-insensitive: if the name is 'htmlStrip', 'htmlstrip' can be used when looking up the service).
- "managedSynonymGraph"
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManagedResource implementation for synonyms, which are so specialized that it makes sense to implement this class as an inner class as it has little application outside the SynonymFilterFactory use cases. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.lucene.analysis.synonym.SynonymGraphFilterFactorystatic final Stringstatic final StringSPI namestatic final StringFields 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 SPI -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.analysis.TokenStreamcreate(org.apache.lucene.analysis.TokenStream input) protected Class<? extends ManagedResource> Let the concrete analysis component determine the ManagedResource implementation.Let the concrete analysis component decide the path it wishes to be managed at.voidonManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> initArgs, ManagedResource res) Called once, during core initialization, to initialize any analysis components that depend on the data managed by this resource.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:
-
SYNONYM_MAPPINGS
- See Also:
-
IGNORE_CASE_INIT_ARG
- See Also:
-
delegate
protected org.apache.lucene.analysis.synonym.SynonymGraphFilterFactory delegate
-
-
Constructor Details
-
ManagedSynonymGraphFilterFactory
-
ManagedSynonymGraphFilterFactory
public ManagedSynonymGraphFilterFactory()Default ctor for compatibility with SPI
-
-
Method Details
-
getResourceId
Description copied from class:BaseManagedTokenFilterFactoryLet the concrete analysis component decide the path it wishes to be managed at.- Specified by:
getResourceIdin classBaseManagedTokenFilterFactory
-
getManagedResourceImplClass
Description copied from class:BaseManagedTokenFilterFactoryLet 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.- Specified by:
getManagedResourceImplClassin classBaseManagedTokenFilterFactory
-
onManagedResourceInitialized
public void onManagedResourceInitialized(org.apache.solr.common.util.NamedList<?> initArgs, ManagedResource res) throws org.apache.solr.common.SolrException Called once, during core initialization, to initialize any analysis components that depend on the data managed by this resource. It is important that the analysis component is only initialized once during core initialization so that text analysis is consistent, especially in a distributed environment, as we don't want one server applying a different set of stop words than other servers.- Throws:
org.apache.solr.common.SolrException
-
create
public org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream input) - Specified by:
createin classorg.apache.lucene.analysis.TokenFilterFactory
-