-
Notifications
You must be signed in to change notification settings - Fork 1
Portlet Configuration
-
Filter Configuration
-
Facets Filter
- Explanation:
-
Graph
- Explanation:
-
Date Range Filter
- Explanation:
-
Facets Filter
-
Result List Configuration
- Explanation:
- Sorting
-
Detail View Configuration
- Explanation:
- Export Configuration
The filter can be configured in filterConfig.json. It is split up in several parts, each for one kind of a filter.
src/main/resources/filterConfig.json
{
"facets": [...],
"graph": {...},
"dataRange": {...}
}
The facets filter are displayed on the right in the form of a menu and are used to filter the results.
src/main/resources/filterConfig.json
"facets": [
{
"id": "string",
"name": "string",
"cssClass": "string",
"subItemsFacet": "string",
"collapsed": true or false,
"scrollable": true or false,
"subItems": [[
{
"id": "string",
"name": "string",
"subItemsFacet": "string",
"cssClass": "string",
"collapsed": true or false,
"scrollable": true or false,
"children_filter": true or false
},
...
]
},
...
]
Key | Description |
---|---|
id |
Prefix for ids |
name |
Label in menu |
cssClass |
Css class for this filter |
subItemsFacet |
field name from in solr index |
collapsed |
Indicate if this filter-group is collapsed |
scrollable |
Indicate if this filter-group is scrollable |
subitems |
List of subitems |
children_filter |
Show subitems of group |
The graph is used to display the factes and their relation to each other. A collapsed facet is not show in the graph.
src/main/resources/filterConfig.json
"graph": {
"nodes" : {
"maxNumber" : Integer
},
"hide" : true or false
}
The date range filter can be used to filter for documents that for example wher create between to dates.
src/main/resources/filterConfig.json
"dateRange": {
"field": "string",
"title": "string",
"format": {
"utc": true or false,
"day": true or false,
"month": true or false,
"year": true or false
}
}
src/main/resources/resultListConfig.json Expand source
{
"title": {
"field": "string",
"highlight": true or false
},
"id": {
"field": "string",
"highlight": false
},
"body": [
[
{
"field": "string",
"title": "string",
"highlight": true or false,
"class": "string"
},
...
]
],
"pages" : {...},
"sortOptions" : [...]
}
Key | Subkey | Description |
---|---|---|
title |
|
what should be displayed in the header of a result entry |
id |
|
the id associated with the result entry |
body |
|
what should be displayed in the body of a result entry |
|
field |
the solr index field that provieds the content |
|
highlight |
if a free text search matches this or part of this field, highlight the match |
|
title |
heading associated with this content |
|
class |
css class |
For appending or removing options in the Sort dropdown you have to find the entry "sortOptions" and edit the corresponding values.The field value represents the Solr sort parameter (http://wiki.apache.org/solr/CommonQueryParameters#sort) and text the title in the dropdown.
src/main/resources/resultListConfig.json Expand source
"sortOptions" : [
{
"value": "score desc",
"text": "Relevance",
"default": true
},
{
"value": "title_sort asc",
"text": "A-Z Title"
},
...
]
Configure which Information should be displayed in which form in the Detail Modal.
src/main/resources/detailViewConfig.json
{
"title": {
"field": "title",
"highlight": true
},
"id": {
"field": "id",
"highlight": false
},
"body": [
[
{
"field": "string",
"title": "string",
"tooltip": "string",
"highlight": true | false,
"hideIfNotSet": true | false
},
...
],
[
{
"field": "string",
...
},
...
]
]
}
Key | Subkey | Description |
---|---|---|
title |
|
what should be displayed in the header of the detail view |
id |
|
the id associated with the detail view |
body |
|
what should be displayed in the body of the detail view |
|
field |
the solr index field that provieds the content |
|
highlight |
if a free text search matches this or part of this field, highlight the match |
|
title |
heading associated with this content |
|
tooltip |
the text that should be displayed when the mouse hovers over the title text |
|
hideIfNotSet |
hide the title if the field was not provieded by the solr responce (e.g. because of missing permissions, or because it was not set) |
The body contains a two-dimensional array. The second dimension is used for grouping the fields together. A horizontal line is displayed btween these groups.
Configuration for the different export options. Currently it is only possible to export Bibtex.
src/main/resources/exportConfig.json
{ "BibTeX": {
"fields": [
"fieldName1", "fieldName2", ...
]
}
}
For the BibTeX export it is necessary to specify all the solr index fields that should be used to generate the BibTeX content, so the Portlet can build the export query correctly.