Class SolrSchemaUpgrader
java.lang.Object
edu.ucsb.nceas.metacat.admin.upgrade.solr.SolrSchemaUpgrader
This class will overwrite the existing schema under the /solr-home/conf/schema.xml
Here is the algorithm:
1. If the hash value of the existing schema.xml is a one in the list of released schema (this means the administrator
didn't customize the schema ), we will overwrite the schema.xml and remove the solr-last-proccessed-date file. The removal
of the solr-last-proccessed-date file will force the metacat-index to rebuild all solr index when the administrator restart
the tomcat at next time.
2. If the hash value of the existing schema.xml isn't in the list, an exception will be throw.
- Author:
- tao
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SolrSchemaUpgrader
public SolrSchemaUpgrader() throws edu.ucsb.nceas.utilities.PropertyNotFoundException, ServiceExceptionConstructor- Throws:
edu.ucsb.nceas.utilities.PropertyNotFoundException
ServiceException
-
-
Method Details
-
upgrade
public void upgrade() throws AdminException, IOException, NoSuchAlgorithmException, SolrSchemaModificationExceptionUpgrade the schema in the solr home
-