Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: small typos and wordings corrections

...

  • enabled : boolean value to enable/disable the OntologyUpdateProcessor
  • annotationField[REQUIEREDREQUIRED] the field in the input document that contains the annotation URI used as the reference in the ontology.

    Info

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

  • ontologyURI[REQUIEREDREQUIREDthe location of the ontology Eg. , such as http://francelabs.com/ontology/owl.rdf or file:///ontology/owl.rdf

    Warning

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

  • labelField : the field in your schema that should be used for the annotation's label(s). Default: ontology_labels
  • childField : the field to use be used for child document references. These are direct (ie. single-step) relationships down the hierarchy. Default: ontology_children
  • parentField : the field to use be used for parent document references. These are direct relationships up the hierarchy. Default: ontology_parents
  • childLabel : the field to use be used for child documents labels. Default: ontology_children_labels
  • parentLabel : the field to use be used for parent documents labels. Default: ontology_parents_labels
  • useLanguages : (boolean) should use language distinction for label fields be used ? If this is set to true, the processor will create additional label fields for each language found language, using the language as a suffix. ie  , for instance  ontology_parents_labels_fr, ontology_parents_labels_en
    The field format is [Original_Label_Field]_[Language]
    This is useful if you want to have, in addition to the original label fields which will contain all values, specific label fields containing values of the concerned language. But remember that the more the Ontology contains languages, the more it will create label fields.
    Default: false
  • includeIndirect : (boolean) should indirect parent/child relationships also be indexed ? If this is set to true, all ancestor and descendant labels and URIs will also be added to the document. Default: false.
  • descendantsField : the field to use be used for the full set of descendant references. These are direct AND indirect relationships down the hierarchy. Default: ontology_descendants
  • ancestorsField : the field to use be used for the full set of ancestor references. These are direct AND indirect relationships up the hierarchy. Default: ontology_ancestors
  • descendantsLabel : the field to use be used for descendant documents labels. Default: ontology_descendants_labels
  • ancestorsLabel : the field to use be used for ancestor documents labels. Default: ontology_ancestors_labels

...

To implement the OntologyUpdateProcessor, follow those these steps:

  • open the 'solrconfig.xml' file in {Datafari_installation_folder}/solr/solr_home/FileShare/conf/

  • add the following line in the lib section (beginning of the document) :

    Code Block
    <lib dir="./lib/jena"/>
    Info

    Datafari uses Apache Jena to load an ontology

  • search for the '<updateRequestProcessorChain name="datafari">'
  • add the following lines after '<processor class="com.francelabs.datafari.updateprocessor.DatafariUpdateProcessorFactory"/>':

    Code Block
    linenumberstrue
    <processor class="com.francelabs.datafari.updateprocessor.OntologyUpdateProcessorFactory">
    	<bool name="enabled">true</bool>
    	<str name="annotationField">ontology_annotation</str>
    
    	<!-- Location of the ontology -->
    	<str name="ontologyURI">file:///owl.rdf</str>
    </processor>
    Info

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

  • Restart Datafari
  • Crawl (again) your documents to add to them the new fields generated by the OntologyUpdateProcessor

...