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, mapresult.unmappedFields.fieldName→result.fieldName. - Then output
{{{fieldName}}}in the template. - Update your types accordingly (or cast as needed).
For example:
const found = result.unmappedFields.find(unmapped => {return unmapped.key === ‘fieldName’})
result.fieldName = found.value
Why Do I See * Searches in Analytics?
An asterisk (*) represents an empty search request. It can occur on initial page load, when a search is submitted with no input, or when whitespace-only input is trimmed before submission.
This is expected behavior and doesn't indicate a bug.
If you maintain a custom UI, you can handle empty input before submitting a search. This requires custom frontend development and is outside the default SearchStax configuration. For more information, see Using Hooks.