Valid from Datafari v4.0

Datafari gives you the opportunity to link an ontology to it, in order to enrich your documents with the ontology data and then use these additional infos in the search phase.

To do so, the first step is to add the OntologyUpdateProcessor as a custom UpdateProcessor in the file {Datafari_Home}/solr/solr_home/FileShare/conf/customs_solrconfig/custom_update_processors.xml

The OntologyUpdateProcessor will index, for each document inserted in Solr, the labels of the corresponding node into the specified ontology but also its parents and children labels and URIs.
It has several parameters that can be set:

Note that this field must be added to the document by yourself: Datafari does not provide any plugin or other mechanism to do it. You may want to modify the DatafariUpdateProcessor or make your own UpdateProcessor to do so.

Datafari only supports OWL ontology format for now, so the ontologyURI parameter has to reference a OWL formated ontology

If you decide not to use the default values for the fields, DO NOT FORGET to add them in the appropriate custom schema file(s) which are located in {Datafari_Home}/solr/solr_home/FileShare/conf/customs_schema
Otherwise none of the ontology features will work !

To implement the OntologyUpdateProcessor, follow these steps:

Datafari uses Apache Jena to load an ontology

Of course you have to replace the values by yours and also add the optional parameters described up above with what you want

Then, you can configure Datafari to use the new Ontology infos on the search requests :

Your Datafari is now ready to use the ontology additional fields during search queries thanks to the OntologySuggestion.widget