Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this tutorial, we will see how to add a facet in the Datafari UI. The facet here will be a facet field, that means that the source of the faceting are the different values of the Solr field.

...

  • Add the custom field to the Solr schema 

Edit custom_fields.xml located incl located in /opt/datafari/solr/solr_home/FileShare/conf/customs_schema/custom_fields.xml and schema and add your new field in JSON format.It needs to be at least indexed (not necessarily stored) and not tokenized so if I want to add the field named job, the configuration will be :

Code Block
languagexml
 <field name={   
      "name":"job",
type=      "type":"string" indexed="true" stored="true" multiValued="false"/>,
      "stored":true,
      "multiValued":false
		
}

Don't forget to save your changes into the file.

  • Reload the FileShare core for Solr to load your new schema

Go to the Datafari Admin User Interface (UI) then click on Search Engine Administration then on Solr Administration

Image Removed

Then click on Core Admin on the main window, check if FileShare is highlighted then click on the Reload button

Image Removed

...

  • Launch the script addCustomSchemaInfo.sh

Launch the script  addCustomSchemaInfo.sh located into /opt/datafari/solr/solr_home/FileShare/conf/customs_schema :


Code Block
cd /opt/datafari/solr/solr_home/FileShare/conf/customs_schema

bash addCustomSchemaInfo.sh


The modifications will be directly applied thanks to the Solr schema API.

Info

note that you can also do it directly by the Solr Admin UI BUT keep in mind that the modifications done will be added in the managed-schema file. If you upgrade Datafari in the future your modifications will be lost.

To do so :

Access the Datafari Admin UI > Search Engine Administration > Solr Administration > collection = FileShare > schema > add field > name = "job" (for this example) > field type = "string" > stored = TRUE > indexed = TRUE

After that, verify that the new field is present by selecting "index fields" in the admin UI > Search Engine Administration > Index Fields > Scroll down list of fields to confirm that "job" is present.


  • So now we can configure ManifoldCF. First thing is obviously to configure the repository connection and the job configuration.

...