Package org.mycore.solr.schema
Class MCRSolrSchemaReloader
java.lang.Object
org.mycore.solr.schema.MCRSolrSchemaReloader
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static void
Removes all fields, dynamicFields, copyFields and fieldTypes in the SOLR schema for the given core.
-
Constructor Details
-
MCRSolrSchemaReloader
public MCRSolrSchemaReloader()
-
-
Method Details
-
reset
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 configurationcoreID
- the ID of the core, which the configuration should be applied to
-
processSchemaFiles
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 configurationcoreID
- the ID of the core, which the configuration should be applied to
-