[DEPRECATED] Custom Solr configuration

DEPRECATED

Deprecated since we migrated towards the usage of the solr schema API

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.


In order to have a smooth update behavior for our users, the Solr configuration files of Datafari are configured by default to include custom files that represent specific parts of Solr. Here is the custom files list and their purpose:

  • Location = {Datafari_home}/solr/solr_home/FileShare/conf/customs_schema/
    • custom_fields.incl - Used to add new fields to the FileShare Solr Core. Structure of the file:

      <fields>
      	<field name="my_field" indexed="true" stored="true" type="string" multiValued="true"/>
      	<field name="my_field2" indexed="true" stored="true" type="string" multiValued="true"/>
      	....
      </fields>
    • custom_copyFields.incl - Used to add custom copy fields to the FileShare Solr Core. Structure of the file:

      <copyField source="my_field" dest="my_copy" />
      <copyField source="my_field2" dest="my_copy2" />
      ...
    • custom_dynamicFields.incl - Used to add custom dynamic fields to the FileShare Solr Core. Structure of the file:

      <dynamicField name="my_dynamic_field*" type="string" multiValued="true"/>
      <dynamicField name="my_second_dynamic_field*" type="string" multiValued="true"/>
      ...
    • custom_fieldTypes.incl - Used to add custom field types to the FileShare Solr Core. Structure of the file:

      <fieldType name="myType" class="solr.TextField" positionIncrementGap="100">
      	<analyzer>
      		<tokenizer class="solr.KeywordTokenizerFactory" />
      		<filter class="solr.LowerCaseFilterFactory" />
      	</analyzer>
      </fieldType>
      
      <fieldType name="myType2" class="solr.TextField" positionIncrementGap="100">
      	<analyzer>
      		<tokenizer class="solr.KeywordTokenizerFactory" />
      		<filter class="solr.LowerCaseFilterFactory" />
      	</analyzer>
      </fieldType>
      
      ...


  • Location = {Datafari_home}/solr/solr_home/FileShare/conf/customs_solrconfig/
    • custom_libs.incl - Used to add additional libraries that Solr must load. Structure of the file:

      <lib dir="./lib/mylibs"/>
      <lib dir="./lib/mylibs2"/>
      ...
    • custom_request_handlers.incl - Used to add new request handlers for the FileShare Solr Core. Structure of the file:

      <requestHandler class="my.requestHandler" name="/myRequestHandler">
      	<lst name="defaults">
      		<str name="param1">true</str>
      		<str name="param2">json</str>
      	</lst>
      </requestHandler>
      
      <requestHandler class="my.requestHandler2" name="/myRequestHandler2">
      	<lst name="defaults">
      		<str name="param1">true</str>
      		<str name="param2">json</str>
      	</lst>
      </requestHandler>
      
      ...
    • custom_search_components.incl - Used to add new search components for the FileShare Solr Core. Structure of the file:

      <searchComponent class="my.searchComponent" name="mySearchComponent">
      	<lst name="component">
      		<str name="name">default</str>
      		<str name="field">sample</str>
      	</lst>
      </searchComponent>
      
      <searchComponent class="my.searchComponent2" name="mySearchComponent2">
      	<lst name="component">
      		<str name="name">default</str>
      		<str name="field">sample</str>
      	</lst>
      </searchComponent>
      
      ...
    • custom_search_handler.incl - Used to replace the default Datafari search handler with a custom one. This file must contain only one search handler which respect the following structure:

      <requestHandler class="solr.SearchHandler" name="/select">
      	....
      </requestHandler>

      When this file is filled with a custom search handler, you MUST comment the original one in the {Datafari_home}/solr/solr_home/FileShare/conf/solrconfig.xml file. Otherwise you will have troubles with Solr and Datafari !


    • custom_update_processors.incl - Used to add new update processors for the FileShare Solr Core. Structure of the file:

      <processor class="my.OwnUpdateProcessorFactory">
      	<bool name="enabled">true</bool>
      	<str name="param">something</str>
      </processor>
      
      <processor class="my.OwnUpdateProcessorFactory2">
      	<bool name="enabled">true</bool>
      	<str name="param">something</str>
      </processor>
      
      ...