Custom Solr configuration
Valid from Datafari 4.3.1
Datafari allows you to add your own Solr configuration to the existing one, without modifying the original configuration files. To do so, both solrconfig.xml and schema.xml files are including custom files that are organized by sections:
Use the files presented below to add whatever you want to the existing Solr configuration of Datafari. They will never be erased by an update in Datafari if you perform a modification, plus they are automatically included in the default conf. You can save them in order to backup your custom conf and easily port them on other Datafari installations.
Keep in mind that if you chose not to use these files and to directly modify the standard solrconfig.xml file and/or schema.xml file, you will have troubles saving and restoring your modifications on a new Datafari installation or an update process.
solrconfig.xml
includes 4 custom files located in {Datafari_Home}/solr/solrcloud/FileShare/conf/customs_solrconfig
:
custom_libs.incl: Used to add new jar libraries that Solr should load. For exemple, to use the ontology feature of Datafari, the Apache Jena lib directory will be added in this file
You need to restart Datafari to load the new libs
custom_request_handlers.incl:Â Used to add new request handlers. You also need to enter your custom request handlers in the file datafari.properties located in
/opt/datafari/tomcat/conf
and edit the propertyÂuserAllowedHandlers
. Enter the request handlers separated by a comma.nano /opt/datafari/tomcat/conf/datafari.properties
In the file edit this line :
userAllowedHandlers=/newselect,/superSearch
custom_search_components.incl: Used to add new searchComponents
custom_update_processors.incl: Used to add new updateProcessors. The updateProcessors that you will specify in this file will be added to the '
datafari
' updateRequestProcessorChain (refer to thesolrconfig.xml
)
These files are not loaded automatically by Solr. As Datafari is using SolrCloud, to take these custom files into account, you must upload them to Zookeeper and then reload the Solr core (and restart Datafari if you added some libs)
schema.xml
also includes 4 custom files located in {Datafari_Home}/solr/solrcloud/FileShare/conf/customs_schema
:
custom_copyFields.incl: Used to add new copyFields to the FileShare core. An example on how to define custom copyField can be found in custom_copyFields.incl.example
custom_dynamicFields.incl: Used to add new dynamicFields to the FileShareCore. An example on how to define custom dynamicField can be found in custom_dynamicFields.incl.example
custom_fields.incl: Used to add new fields to the FileShare core. An example on how to define custom field can be found in custom_fields.incl.example
custom_fieldTypes.incl: Used to add new fieldTypes to the FileShare core. An example on how to define custom field can be found in custom_fieldTypes.incl.example