Configuration du widget HierarchicalFacet

63 views
Skip to first unread message

severin.t...@gmail.com

unread,
Jun 28, 2017, 4:08:13 AM6/28/17
to Datafari
Bonjour,

j'ai installé datafarin 3.2 sur un serveur ubuntu et configuré ma recherche sur un partage windows. Tout marche nickel, c'était rapide et simple à configurer, un vrai bonheur.

J'essaye maintenant d'utiliser le widget HierarchicalFacet que j'ai vu dans la doc, mais je n'arrive pas à le faire fonctionner.

J'ai essayé de décommenter dans le fichier searchView.jsp le div sur ce widget ainsi que l'appek du script js associé. J'ai également décommenté dans search.js l'appel à la fonction javascript du widget. Tout cela sans succès. Comment peut on activer ce module ? La doc ne l'explique pas (alors que pour d'autres widgets c'est expliqué), j'ai loupé un truc ?


Je vous remercie en tout cas d'avance pour l'aide que vous pourrez m'apporter.

Julien

unread,
Jun 28, 2017, 7:40:48 AM6/28/17
to Datafari

Hi Severin,

 

First thank you for using Datafari, we are glad you appreciate it !

 

Concerning the HierarchicalFacet, I think what you did to activate it is ok and if the UI of Datafari is still up after what you did, it means that the widget is correctly loaded and initialized.

Now be careful because this widget needs some prerequisites to be operationnal, like indicated in the documentation : https://datafari.atlassian.net/wiki/display/DATAFARI/Widgets+and+Modules

Indeed, you need to configure it so use a multi-valued field in the Solr index that represents a path tokenization where each value is prefixed by its depth level.
For example, the path '/home/france/labs' will be tokenized as this : 0/home, 1/home/france, 2/home/france/labs

Such field is not natively created during the indexation phase because it strongly dépends on the crawled source.

When you de-comment the widget initialization in the search.js script, the default field that is used by the widget is ‘urlHierarchy’. This field exists in the Solr index but it is not filled. So what you need to do is to fill it like in the example during the indexation phase by modifying the DatafariUpdateProcessor. You will find in the class a commented section of the code that is an example to fill this field, you can use it and adapt it (maybe you won’t need to adapt it).

 

But you make a good point, there is a lack of documentation concerning this part and we will soon update it.

 

Regards,
Julien Massiera

 

 

 

 

De : severin.t...@gmail.com
Envoyé le :mercredi 28 juin 2017 10:08
À : Datafari
Objet :Configuration du widget HierarchicalFacet

--
You received this message because you are subscribed to the Google Groups "Datafari" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datafari+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 


Garanti sans virus. www.avast.com

severin.t...@gmail.com

unread,
Jun 30, 2017, 3:46:19 AM6/30/17
to Datafari
What is the file to modify/decomment where I can found the DatafariUpdateProcessor class ?

Julien

unread,
Jun 30, 2017, 7:18:30 AM6/30/17
to Datafari

Hi,

 

Once you have checkouted the Datafari github repository, it is located in [DATAFARI_REPO]/datafari-updateprocessor/src/main/java/com/francelabs/datafari/updateprocessor/DatafariUpdateProcessor.java

 

The commented lines start at the line 72.
Once you have done your modifications you need to generate the update processor jar with maven with the command ‘mvn install’ ( to run in the ‘[DATAFARI_REPO]/datafari-updateprocessor/’ folder)  
Then you need to shutdown Datafari, replace the current update processor by the new one with the command ‘sudo cp [DATAFARI_REPO]/datafari-updateprocessor/target/datafari-updateprocessor-3.2.0-SNAPSHOT.jar /opt/datafari/solr/solrcloud/FileShare/lib/custom/’
Finally restart Datafari and re-crawl your share (copy the existing MCF job and delete the original one then re-crawl)

 

Regards,

Julien

 

De : severin.t...@gmail.com
Envoyé le :vendredi 30 juin 2017 09:46
À : Datafari
Objet :Re: Configuration du widget HierarchicalFacet

 

What is the file to modify/decomment where I can found the DatafariUpdateProcessor class ?

--

You received this message because you are subscribed to the Google Groups "Datafari" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datafari+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

severin.t...@gmail.com

unread,
Jul 3, 2017, 2:47:01 AM7/3/17
to Datafari

OK, this works !!!! Thanks.


Reply all
Reply to author
Forward
0 new messages