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

appTitle

String

Semanteer search

The title of the VUI application

searchURL

String

/sl/search

The endpoint for search calls

suggestURL

String

/sl/suggest

The endpoint for suggest calls

recordURL

String

/sl/record

The endpoint for record detail calls; url in sem_actions has precedence over this url

mltURL

String

-

The endpoint for more like this suggestions, this url has precedence over url in sem_actions

slconfigURL

String

/sl/config

The endpoint for the search layer configuration

activeSLConfig

String

default

The configuration to use to determine the components

semc

String

null

The configuration to use as semc parameter, should be similar to activeSLConfig or null

facets.defaultUIShow

Boolean

false

Value determining whether facet components should be by default shown or hidden

facets.displayOpen

Boolean

false

Value determining whether facet components such as lists or hierarchies are by default displayed in open mode or as dropdown

facets.defaultExpandLevel

number

0

Default value for expansion level of facet hierarchies

map.active

Boolean

false

Value to activate map view

map.clustered

Boolean

false

If map view is activated, this value determines whether the map uses clustered display mode

map.semc

String

map

The semc parameter to be used for map calls

autocomplete

object

Autocomplete settings

The section to determine all the settings for the autocomplete dialog

autocomplete.semc

String

autocomplete

The semc parameter to be used for map calls

autocomplete.prefetched.label

String

Results

Label to show above prefetched results in the autocomplete dialog

autocomplete.prefetched.fields

array

null

Field properties

Array of field properties to display for each prefetched result

autocomplete.facets

array

null

Facet properties

Array of properties defining the facets to display in the autocomplete dialog

result

object

The section to determine all the settings for displaying results

result.baseUrl

String

null

Defines the base url to prepend to sem_url in case external urls are relative. The assembled links are _blank links.

result.showAllIndexedFields

Boolean

false

Defines whether an option to show all indexed fields of results should be provided. Useful for testing purposes.

result.image.fieldName

String

sem_image_thumbnail_url

Field name to use for image urls.

result.image.baseUrl

String

null

Defines the base url to use for image urls.

result.fields

array

null

Field properties

Array of field properties to display for each result in the result list

result.details.fields

array

null

Field properties

Array of field properties to display for each result in the detail view

groupdoc

object

The section to determine all the settings for displaying group docs, if a grouped results configuration is used

groupdoc.defaultGroupValue

String

Uncategorized

The section name for results that don’t belong to a group.

groupdoc.baseUrl

String

null

Defines the base url to prepend to sem_url in case external urls are relative. The assembled links are _blank links.

groupdoc.fields

array

null

Field properties

Array of field properties to display for each group doc in the result list

childdocs

object

The section to determine all the settings for displaying child docs, if the search results have child documents

childdocs.active

Boolean

false

Defines if child documents should be rendered along with search results

childdocs.label

String

null

Defines the label for child documents of a search result

childdocs.field

String

null

Defines the field that contains the child documents of a search result

childdocs.fields

array

null

Field properties

Array of field properties to display for each child doc of a search result

mlt.title

String

null

Defines the label of the "More-like-this" tab

mlt.showIdx

Boolean

false

Defines if index of MLT results should be rendered

mlt.cols

number

4

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

fieldname

String

null

Defines the name of the field that contains the property to display

label

String

null

Defines the label to use for the property to display

type

String

null

Defines the type of the property to display, the following values are possible: string, datetime, date, array, boolean, url

subtype

String

null

Defines the type of the property to display, the following values are possible: url

newline

Boolean

false

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

fieldname

String

null

Defines the name of the field that contains the facet to display

label

String

null

Defines the label to use for the facet to display

type

String

null

Defines the type of the facet to display, the following values are possible: facet_fields, facet_hierarchies

limit

number

null

Defines the maximum number of options to render for this facet

levels

number

null

Defines the number of levels to render for facet hierarchies

className

String

null

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
  }
}