A new feature has appeared in beta version in Datafari 4.1, it is the categories context for search. It is splitted in two parts : a suggester and a search behavior.
The suggester
The suggester is used to try to predict that the user search belongs to a category and propose a "special option" in the autocomplete to perform the search in that specific category. If the user select that suggester option, in addition to perform the search in the category, Datafari may be able to change the way the results are displayed (depending on what was implemented in the code).
To configure a suggester for a category you will first need to create a new suggest request handler in Solr, based on the desired category field. Then you will need to edit AUTOCOMPLETESUGGESTERS variable in the configuration file DATAFARi_HOME/tomcat/conf/entity-autocomplete.properties :AUTOCOMPLETESUGGESTERS=[{"i18nKey":"asAuthor", "serverUrl":"", "servlet":"suggestAuthors", "maxSuggest":1, "categoryKey":"authors", "categoryi18nKey":"authors"}]
This variable must contain a json array, composed by a list of json objects having the following fields :
- i18nKey
- serverUrl
- servlet
- maxSuggest
- categoryKey
- categoryi18nKey