Versions Compared

Key

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

...

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

 


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

...

I invite you to go to this section of the wiki if you are not familiar with this step : Crawling

Here we add a Web repository connection and then added a FranceLabswebsite job in which we configured the seeds tab with the url of the France Labs website. 


We did the same thing for Datafari website (seed: datafari.com) :

...

The global configuration of the FranceLabs job is this one now :

 


We do the same thing for the Datafari job, the parameter name is job too and the value is Datafari.

  • We can now launch the crawl job for the two jobs. Go to the Jobs section and click on "Status and Jobs management". Than click on Start for the two jobs.

 


We have now to wait a little for some documents to be indexed.

...

Then click on the blue button Execute Query : it will launch a default Solr query : we search anything on all the Solr corpus. We should obtain :

 


So we notice that in the fields list, we have the field job with the value FranceLabs. It is exactly what we expected : we have a new field with a different value fo each job configured in MCF.

...

We need to modify the search.js file in order to add the TableFacet widget, we also have to add the facet display in the searchView.jsp and finally add the label of the facet in the i18n files : en.json and fr.json. 


  • First, edit the file search.js into /opt/datafari/tomcat/webapps/Datafari/js, add the widget in the code :

...

The order is important, by default we have the facets in this order : by date, type and source. If I want to the job facet just after the source facet, the file seems like that :

 


  • Ok now the final step is to localize the label name of our new facet. Let's edit the two files en.json and fr.json in /opt/datafari/tomcat/webapps/Datafari/js/AjaxFranceLabs/locale :

...

Code Block
languagexml
"job" : "Job",

...


Screenshot of the fr.json file :

 


  • The configuration is now over. We can check if our new facet is correctly displayed in Datafari :

...

It seems to be the case. We can now filter the results by the ManifoldCF job : documents from Datafari website or France Labs website !