AI Search adding searchable pages

Joakim St_ckel
Tera Expert

Hi SN community!

I'm working on making some specific esc portal pages searchable. That's all accomplished. A Navigation Tab for pages is added in the related links of the sys_search_context_config table, as well as a script in the Search Scripted Post-processors to fullfill it.

 

<------>

function process(record) {


var transformableTables = ['sp_page'];

var table = record.getTable();

// It is a good practice to early terminate if possible, to avoid unnecessary overhead.
if (transformableTables.indexOf(table) === -1)
return;

var gr = new GlideRecord(table);
gr.get(record.getSysId());
//This sets the URL and adds the ID from sp_pages
var url = "/esc?id=" + gr.id.toString();
record.setUrl(url);

}

<------>

But I don't see where I've first of all managed to choose the glyphs for the search results? Where is this done? Or has it just granted it itself?

BR

5 REPLIES 5

Jesse_H
Mega Sage

I believe it's the EVAM View Templates/Config for styling search display.

Jesse_H_0-1674851835602.png

 

Jesse_H
Mega Sage

Hey Joakim, did my suggestion help? Any update on this?

subhashini1
Tera Contributor

Hi Joakim,

 

Can you please help me with the code to search a ESC Portal PAGE in AI Search. I am not able to achieve it.  I added the table on the search source. But not able to search the particular word on the portal.

laurenlauren
Tera Contributor

Thank you for sharing your script to be able to search pages, this was helpful! Did you ever figure out how to change the icon for the search result? I tried creating a View Template for it, but that seemed to override the scripted processor navigation, so I would get the icon but not the correct navigation. Rather, no navigation at all, as it wouldn't click to go anywhere.