Skip to main content

Suggest

Suggest Configuration

Suggest Keywords

{
"code": "keywords",
"searchCode": "search",
"name": "Suggest Keywords",
"type": "keywords",
"count": 5,
"minChars": 1,
"document": {
"fields": {
"suggest": {
"source": "suggest"
},
"suggestHighlighted": {
"source": "suggest",
"highlighting": "inverse",
"highlightingTag": "b"
}
}
}
}
  • code: keywords - the name of the suggest block in the response
  • type: keywords - uses the keyword implementation - complex algorithm (TODO write a blog post)
  • searchCode: the search which is used to compute the suggests
  • count: 5 - 5 entries should be displayed in maximum
  • minChars: 1 - the suggest is triggered when the user types at least one character
  • document - describes the response structure of the suggest
  • document.fields - describe the fields in the response
  • document.fiels.suggest.source - the field suggest is mapped from the source suggest
  • document.fiels.suggestHighlighted
    • source - the field suggestHighlighted is mapped from the source suggest
    • highlighting: inverse - inverse highlighting is used (other options: standard)
    • highlightingTag: b - the <b> tag is used for highlighting
{
"code": "quicklinks",
"searchCode": "qsc-documentation",
"name": "Suggest Quicklinks Initial",
"type": "search",
"count": 5,
"minChars": 0,
"document": {
"fields": {
"title": {},
"url": {}
}
}
}
  • code: quicklinks - the name of the suggest block in the response
  • type: search - uses the search implementation - a standard search is used to compute the suggest entries
  • searchCode: qsc-documentation - the search which is used to compute the suggests
  • count: 5 - 5 entries should be displayed in maximum
  • minChars: 0 - the suggest is triggered when the user put the courser to the input box
  • document - describes the response structure of the suggest
  • document.fields - describe the fields in the response
    • title - the field title
    • url - the field docId
{
"code": "quicklinks",
"searchCode": "qsc-documentation",
"name": "Suggest Quicklinks",
"type": "search",
"count": 5,
"minChars": 1,
"document": {
"fields": {
"url": {},
"title": {
"highlighting": "inverse",
"highlightingTag": "b"
}
}
}
}
  • code: quicklinks - the name of the suggest block in the response
  • type: search - uses the search implementation - a standard search is used to compute the suggest entries
  • searchCode: qsc-documentation - the search which is used to compute the suggests
  • count: 5 - 5 entries should be displayed in maximum
  • minChars: 1 - the suggest is triggered when the user types at least one character - the initial quicklinks are replaced by the quicklinks
  • document - describes the response structure of the suggest
  • document.fields - describe the fields in the response
    • url - the field url
    • title - the field docId
      • the title is highlighted inverse