Semanteer VUI
Semanteer VUI is Semanteer’s out-of-the-box web-based search UI for rapid prototyping and improvement cycles. It is useful for experimenting with different search configurations as well as testing new search features in existing installations.
The behavior of the Semanteer VUI automatically adjusts itself to the settings in the search-layer-configuration. In addition, the VUI comes with a configuration file which allows the selection of certain configurations, the activation of features and the specification of rendering settings. The settings can be easily configured in one configuration file (config.json) which can can be found in the main folder of the VUI application.
This chapter describes the basic settings of the VUI configuration.
-
It explains the structure of the configuration file.
-
It contains a sample configuration as example.
The configuration file
The config.json configuration file needs to be saved in the root folder of the Semanteer VUI application. Each installation comes with a default file which can be adjusted as needed. The configuration file contains different sections:
-
General settings such as title, urls, which search layer configuration to use, default settings for facets and so on.
-
Section for the autocomplete configuration (used in grouped and ungrouped mode)
-
Section for the result configuration (used for grouped and ungrouped search results)
-
Section for the groupdoc configuration (used in grouped mode)
-
Section for child document configuration
General settings and structure
| Name | Type | Default value | See also | Description |
|---|---|---|---|---|
|
|
|
The title of the VUI application |
|
|
|
|
The endpoint for search calls |
|
|
|
|
The endpoint for suggest calls |
|
|
|
|
The endpoint for record detail calls; url in sem_actions has precedence over this url |
|
|
|
|
The endpoint for more like this suggestions, this url has precedence over url in sem_actions |
|
|
|
|
The endpoint for the search layer configuration |
|
|
|
|
The configuration to use to determine the components |
|
|
|
|
The configuration to use as semc parameter, should be similar to activeSLConfig or null |
|
|
|
|
Value determining whether facet components should be by default shown or hidden |
|
|
|
|
Value determining whether facet components such as lists or hierarchies are by default displayed in open mode or as dropdown |
|
|
|
|
Default value for expansion level of facet hierarchies |
|
|
|
|
Value to activate map view |
|
|
|
|
If map view is activated, this value determines whether the map uses clustered display mode |
|
|
|
|
The semc parameter to be used for map calls |
|
|
|
The section to determine all the settings for the autocomplete dialog |
||
|
|
|
The semc parameter to be used for map calls |
|
|
|
|
Label to show above prefetched results in the autocomplete dialog |
|
|
|
|
Array of field properties to display for each prefetched result |
|
|
|
|
Array of properties defining the facets to display in the autocomplete dialog |
|
|
|
The section to determine all the settings for displaying results |
||
|
|
|
Defines the base url to prepend to sem_url in case external urls are relative. The assembled links are _blank links. |
|
|
|
|
Defines whether an option to show all indexed fields of results should be provided. Useful for testing purposes. |
|
|
|
|
Field name to use for image urls. |
|
|
|
|
Defines the base url to use for image urls. |
|
|
|
|
Array of field properties to display for each result in the result list |
|
|
|
|
Array of field properties to display for each result in the detail view |
|
|
|
The section to determine all the settings for displaying group docs, if a grouped results configuration is used |
||
|
|
|
The section name for results that don’t belong to a group. |
|
|
|
|
Defines the base url to prepend to sem_url in case external urls are relative. The assembled links are _blank links. |
|
|
|
|
Array of field properties to display for each group doc in the result list |
|
|
|
The section to determine all the settings for displaying child docs, if the search results have child documents |
||
|
|
|
Defines if child documents should be rendered along with search results |
|
|
|
|
Defines the label for child documents of a search result |
|
|
|
|
Defines the field that contains the child documents of a search result |
|
|
|
|
Array of field properties to display for each child doc of a search result |
|
|
|
|
Defines the label of the "More-like-this" tab |
|
|
|
|
Defines if index of MLT results should be rendered |
|
|
|
|
Defines number of columns to span per MLT result (12 = 1 per row, 4 = 3 per row) |
Field properties
Field properties can be defined for prefetched results, results, result details and group docs. The general structure looks as follows:
{
"fieldName": "sem_links",
"label": "Links",
"type": "array",
"subtype": "url",
"newline": true
}
| Name | Type | Default value | See also | Description |
|---|---|---|---|---|
|
|
|
Defines the name of the field that contains the property to display |
|
|
|
|
Defines the label to use for the property to display |
|
|
|
|
Defines the type of the property to display, the following values are possible: string, datetime, date, array, boolean, url |
|
|
|
|
Defines the type of the property to display, the following values are possible: url |
|
|
|
|
Defines after rendering this property a linebreak should be added |
Facet properties
Facet properties can be defined for the autocomplete section. The general structure looks as follows:
{
"label": "Color",
"fieldName": "color",
"type": "facet_fields",
"limit": 10,
"levels": 1,
"className": "horizontal_list",
}
| Name | Type | Default value | See also | Description |
|---|---|---|---|---|
|
|
|
Defines the name of the field that contains the facet to display |
|
|
|
|
Defines the label to use for the facet to display |
|
|
|
|
Defines the type of the facet to display, the following values are possible: facet_fields, facet_hierarchies |
|
|
|
|
Defines the maximum number of options to render for this facet |
|
|
|
|
Defines the number of levels to render for facet hierarchies |
|
|
|
|
Defines the class name to add when rendering this facet, a typical setting is: horizontal_list |
Sample configuration
The code below shows the config.json of the wine-demo.
Code example
{
"appTitle": "Wine demo search",
"searchURL": "/sl/search",
"suggestURL": "/sl/suggest",
"recordURL": "/sl/record",
"mltURL": "/sl/morelikethis",
"slconfigURL": "/sl/config",
"activeSLConfig": "default",
"semc": "",
"facets": {
"defaultUIShow": true,
"displayOpen": false,
"defaultExpandLevel": 1
},
"map": {
"active": true,
"clustered": true,
"semc": "map"
},
"autocomplete": {
"semc": "autocomplete",
"prefetched": {
"label": "",
"fields": [
{
"fieldName": "wine_type",
"label": "Type",
"type": "string"
},
{
"fieldName": "color",
"label": "Color",
"type": "string"
},
{
"fieldName": "wine_producer",
"label": "Producer",
"type": "string"
}
]
},
"facets": [
{
"label": "Color",
"fieldName": "color",
"className": "horizontal_list",
"levels": 1,
"limit": 10,
"type": "facet_fields"
},
{
"label": "Category",
"fieldName": "sem_category_names_branch",
"className": "horizontal_list",
"levels": 2,
"limit": 20,
"type": "facet_hierarchies"
}
]
},
"groupdoc": {
"baseUrl": "",
"defaultGroupValue": "",
"fields": [
{
"fieldName": "sem_lang",
"label": "Lang",
"type": "string"
}
]
},
"result": {
"baseUrl": "",
"showAllIndexedFields": true,
"image": {
"fieldName": "",
"baseUrl": ""
},
"fields": [
{
"fieldName": "wine_type",
"label": "Type",
"type": "string"
},
{
"fieldName": "color",
"label": "Color",
"type": "string"
},
{
"fieldName": "wine_producer",
"label": "Producer",
"type": "string"
},
{
"fieldName": "country",
"label": "Country",
"type": "string"
},
{
"fieldName": "percentage_alcohol",
"label": "Alcohol",
"type": "string"
}
],
"details": {
"fields": [
{
"fieldName": "wine_type",
"label": "Type",
"type": "string"
},
{
"fieldName": "color",
"label": "Color",
"type": "string"
},
{
"fieldName": "percentage_alcohol",
"label": "Alcohol",
"type": "string"
},
{
"fieldName": "vintage",
"label": "Vintage",
"type": "string"
},
{
"fieldName": "wine_producer",
"label": "Producer",
"type": "string"
},
{
"fieldName": "vineyard",
"label": "Vineyard",
"type": "string"
},
{
"fieldName": "appellation",
"label": "Appellation",
"type": "string"
},
{
"fieldName": "country",
"label": "Country",
"type": "string"
},
{
"fieldName": "region",
"label": "Region",
"type": "string"
},
{
"fieldName": "sem_encoded_id",
"label": "SEMID",
"type": "string"
},
{
"fieldName": "sem_timestamp",
"label": "Timestamp",
"type": "date"
}
]
}
},
"childdocs": {
"active": true,
"field": "_childDocuments_",
"label": "Reviews",
"fields": [
{
"fieldName": "author",
"label": "Author",
"type": "array",
"newline": true
},
{
"fieldName": "comment",
"label": "Comment",
"type": "array",
"newline": true
},
{
"fieldName": "rating",
"label": "Rating",
"type": "string",
"newline": true
}
]
},
"mlt": {
"title": "Content-Based Recommendations",
"cols": 6,
"showIdx": true
}
}