AI Search result icons like on catalog items?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 04:15 AM - edited 11-02-2022 04:43 AM
Hi everyone.
So when searching with AI Search, if the search results are catalog items, the search result icon next to the search result is the same icon as defined on the catalog item.
If I want that on another result type, what do I define in the EVAM view template? Right now I've defined a static icon. But I would like to be able to use the icons defined on the catalog item for a more dynamic result.
I've added Icon as a table field on the evam view config.
I've tried all sorts of stuff with the template JSON, but right now it looks like this:
{
"component": "sn-search-result-evam-card",
"staticValues": {
"markerType": {
"translatable": false,
"key": "icon"
},
"icon": {
"translatable": false,
"key": "icon"
},
"imageURL": {
"translatable": false,
"key": "columns.icon"
},
"imageType": {
"translatable": false,
"key": "image"
}
},
"mappings": {
"title": "ai_search_teaser_title",
"marker": "columns.icon",
"summary": "ai_search_teaser_text",
"ariaLabel": "ai_search_teaser_title"
},
"actionMappings": {
"clickAction": "navigation"
}
}
Can you point to a solution, or a way to go?
- Labels:
-
AI Search

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2022 05:20 AM
This also doesn't work. When I click the topic, I get the correct view, and I see that it has an icon.
When I go to the topic record I see that it has an icon.
But nothing shows up in the search results.
Very frustrating, because it does on catalog items.
{
"component": "sn-search-result-evam-card",
"staticValues": {
"icon": {
"translatable": false,
"key": "icon"
},
"imageType": {
"translatable": false,
"key": "image"
}
},
"mappings": {
"title": "ai_search_teaser_title",
"summary": "ai_search_teaser_text",
"ariaLabel": "ai_search_teaser_title",
"imageURL": "icon"
},
"actionMappings": {
"clickAction": "navigation"
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2022 04:15 AM
Bump
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 12:21 PM
It appears that you are on the right path. I would just recommend you confirm that the supporting table field is defined and populated as you expect.
Below is the example of a search result with image showing.
This is the EVAM template supporting that result with "imageURL" set to "picture"
The Picture column definition:
The image that will show in the search result populated in the picture column.