Class MCRSolrSchemaReloader

java.lang.Object
org.mycore.solr.schema.MCRSolrSchemaReloader

public class MCRSolrSchemaReloader extends Object
This class provides methods to reload a SOLR schema using the SOLR schema API see https://lucene.apache.org/solr/guide/7_3/schema-api.html
Author:
Robert Stephan, Jens Kupferschmidt
  • Constructor Details

    • MCRSolrSchemaReloader

      public MCRSolrSchemaReloader()
  • Method Details

    • reset

      public static void reset(String configType, String coreID)
      Removes all fields, dynamicFields, copyFields and fieldTypes in the SOLR schema for the given core. The fields, dynamicFields, and types in the lists SOLR_DEFAULT_FIELDS, SOLR_DEFAULT_DYNAMIC_FIELDS, SOLR_DEFAULT_DYNAMIC_FIELDS are excluded from remove.
      Parameters:
      configType - the name of the configuration directory containg the Solr core configuration
      coreID - the ID of the core, which the configuration should be applied to
    • processSchemaFiles

      public static void processSchemaFiles(String configType, String coreID)
      This method modified the SOLR schema definition based on all solr/{coreType}/solr-schema.json in the MyCoRe-Maven modules resource path.
      Parameters:
      configType - the name of the configuration directory containg the Solr core configuration
      coreID - the ID of the core, which the configuration should be applied to