UI Kits FAQ


This page is a repository of Frequently Asked Questions about the SearchStax Site Search solution’s UI Kits. We will add topics here as they become available.


Displaying “Unmapped Fields”

The Site Search Results Fields screen lets you assign returned field values to specific display areas on the search-results “card.” These are known as “mapped fields.”

The remaining “unmapped fields” are returned by the emselect endpoint as an array of fieldname/value pairs. The array is available to the searchResultTemplate of the Result Widget.

To display the value of a single unmapped field, one must either iterate over the unmappedFields or use something like afterSearch to extract unmappedFields.fieldName into a custom property on the result.

You’ll typically need to extend the result type (or use type assertion) to include that new custom property, since the base types don’t expect it.

So the practical path is:

  • In afterSearch, map result.unmappedFields.fieldNameresult.fieldName.
  • Then output {{{fieldName}}} in the template.
  • Update your types accordingly (or cast as needed).

Example:

const found = result.unmappedFields.find(unmapped => {return unmapped.key === ‘fieldName’}) 
result.fieldName = found.value

Questions?

Do not hesitate to contact the SearchStax Support Desk.