...
Name | Optional | Default value | Description |
---|---|---|---|
| The title showed at the top of the facet | ||
| The solr field associated to the facet | ||
| Operator, either “OR” or “AND”. Tells how documents are shown when selecting multiple entries in the facet. If “OR” documents need to have at least one selected element in the concerned field to be selected. If “AND” they need to have all selected elements as part of the concerned field | ||
| The maximum number of elements that are shown if the facet is not expanded | ||
| The maximum number of elements that are shown if the facet is expanded (after clicking show more) | ||
| yes | checkbox | Specify the type of FieldFacet to use. It can take these values :
|
| yes | true | True to display the FieldFacet in the left panel. This option is only an UI effect. The facet is still registered as a field facet in the query. |
| yes | false | Set to true to force the query to Solr even if show is false (keep in mind that if show is true, the facet is queried whatever the value of the sendToSolr parameter). Required to be true for the use of field facet tabs (https://datafari.atlassian.net/wiki/spaces/DATAFARI/pages/2625634305/Customizing+DatafariUI#Search-Tabs ), which is its only purpose for now. |
| yes | {} | Define a map key/value to rename labels from this field facet results values. |
QueryFacet:
A query facet displays a facet tied to provided queries with the possibility to filter results based on those queries. It can include children components, providing the ability for the user to provide a custom query. In the example below, we present a way to provide a custom date range.
...
FieldFacet
: it will generate as many tabs as a field contains out of a result query. For example, with the "extension" field in our demo, it will create one tab per type of extension returned by the search query (for instance one tab for the pdf type, one for the doc type etc).
This type of tab has two parameters :field
: the field name used to generate the tabsmax
: the max number of tabs that can be generated
mappingValues
(optional) : Define a map key/value to rename labels from this field facet results values.
Raw
: This type of tab is called raw because it is just a link to a given URL. It has 2 parameters :label
: the label of the tab (it is i18n)url
: an HTTP URL.target
: (optional) define where to open the url. If absent, default is _self. Values accepted: _self OR _blank
...
Warning |
---|
This feature is not active yet (as of April 2022). You can define you preferences, but no boosting will occur. |
MappingValues (optional)
From ui-config.json
file, you can customize labels from results list for each FieldFacet
or Field tab
. This field is a map key/value to rename a specific name.
Example:
Code Block | ||
---|---|---|
| ||
mappingValues: {
"pdf": "Fichier PDF",
"doc": "Fichier Doc"
"html": "Fichier Web"
} |
Key value is case sensitive, the label from label have to match exactly to rename the label (i.e. html
is different of HTML
)
QueryParams
From ui-config.json
file, you can customize the fields you send to Solr. queryParams
is an object which can have the following keys :
...