edu.ucsb.nceas.metacat.admin.upgrade.solr

## Class SolrSchemaUpgrader

- java.lang.Object
- - edu.ucsb.nceas.metacat.admin.upgrade.solr.SolrSchemaUpgrader

-     public class SolrSchemaUpgrader
      extends java.lang.Object

  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

    Constructors
    Constructor and Description
    `SolrSchemaUpgrader()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `upgrade()` Upgrade the schema in the solr home

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SolrSchemaUpgrader

          public SolrSchemaUpgrader()
                             throws edu.ucsb.nceas.utilities.PropertyNotFoundException,
                                    ServiceException

      Constructor
      Throws:
        `edu.ucsb.nceas.utilities.PropertyNotFoundException`
        `ServiceException`

  - ### Method Detail

    - #### upgrade

          public void upgrade()
                       throws AdminException,
                              java.io.IOException,
                              java.security.NoSuchAlgorithmException,
                              SolrSchemaModificationException

      Upgrade the schema in the solr home
      Throws:
        `java.security.NoSuchAlgorithmException`
        `SolrSchemaModificationException`
        `AdminException`
        `java.io.IOException`

Copyright © 2023 Regents of the University of California. All Rights Reserved.