Custom Solr configuration

Validity

Valid for 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 the solrconfig.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


Keep in mind too that we use a managed schema now so for the files in custom_schema, they ONLY will be loaded by launching the script into /opt/datafari/solr/solrcloud/FileShare/conf/addCustomSchemaInfo.sh.

You can also directly add fields by the Solr Admin UI. But the modifications done will be added in the managed-schema file. If you upgrade Datafari in the future your modifications will be lost.


Validity

Valid for 4.2+


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
  • 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 the solrconfig.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


Keep in mind too that we use a managed schema now so for the files in custom_schema, they ONLY will be loaded by launching the script into /opt/datafari/solr/solrcloud/FileShare/conf/addCustomSchemaInfo.sh.

You can also directly add fields by the Solr Admin UI. But the modifications done will be added in the managed-schema file. If you upgrade Datafari in the future your modifications will be lost.



Validity

Valid at least since v4.0


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 2.x 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.


Note that if for some reason you need to modify directly the solrconfig.xml file or the schema.xml file, you can do it but we strongly advise you not to do so. These files may change in future versions of Datafari and you will have to manually manage the conflict during the 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
  • custom_request_handlers.incl:  Used to add new request handlers
  • 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 the solrconfig.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


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

These files are not loaded automatically in the schema. To do that, you should use the script {Datafari_Home}/solr/solr_home/FileShare/conf/customs_schema/addCustomSchemaInfo.sh to load the custom schemas information in Datafari through the schema API of Solr.