Class SolrCoreInit
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.content.indexing.solr.SolrCoreInit
- All Implemented Interfaces:
Init
,Configurable
,LogEnabled
,Serviceable
Creates one or several Solr cores at initialization.
-
Field Summary
Modifier and TypeFieldDescriptionThe name of the cores to create.protected SolrIndexer
The Solr indexer. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) protected boolean
createCores
(Set<String> coreNames) Create the cores.void
init()
Method to be implemented by user Init class.void
service
(ServiceManager manager) protected boolean
Updates the Ametys URL on Solr serverMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_solr
The Solr indexer. -
_coreNames
The name of the cores to create.
-
-
Constructor Details
-
SolrCoreInit
public SolrCoreInit()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
init
Description copied from interface:Init
Method to be implemented by user Init class. Here you should manage the business part of your application init. As an Avalon component, class extending this interface have access to all Cocoon-managed components, all plugins, ... -
createCores
Create the cores.- Parameters:
coreNames
- the names of the cores to create.- Returns:
- true if an exception occured. The exception was caught and not re-thrown (just logged)
-
updateAmetysUrlCoreProperty
Updates the Ametys URL on Solr server- Returns:
- true if an exception occured. The exception was caught and not re-thrown (just logged)
-