This post allows the user to override the Alfresco Solr configurations in the Alfresco SDK 3.0
- Override Tomcat’s Solr context configuration to point to custom Solr4 config dir.
- Copy default Solr configurations into this directory.
- Override new configurations as needed.
Override Solr Context Configurations
First we will add a config element in our main pom.xml that carries the property of our Solr configurations.
[crayon-5e293ccf3dd80501462276/] Next we will edit the tomcat context configuration for Solr to use our new config element “solr.config.home.” This file can be found in src/resources/tomcat/context-solr.xml
Copy Default configurations into new config folder
Next we will create a solr configuration folder under src/test/resources that will point to our custom solr configurations. In this setup, we use src/test/resources/solr4. This path is also the path configured in our “solr.config.home” property in our main pom.xml
Existing configurations can be found in the alf_data_dev directory, which was created when the SDK started up for the first time.
The configuration files and folders to copy are depicted in the following screenshot into the solr4 directory that we created:
At this point, you can override your solr configurations as needed.