How to hide a catalog item from search but not the catalog itself?

shoobadoop
Tera Contributor

Hello everyone,

On our Portal we have a catalog called Links which houses a ton of content items that lead to various things (applications, department homepages, etc.). We have created a category called *Essential* which contains duplicate content items that our end users are most likely to be interested in. However, since these content items are duplicates, these duplicates also show up in the search bar.

We thought that toggling "No search" would bar the Essential links from the search bar yet keep them in the Catalog, but it looks like it removes them from both (though strangely the item count still appears next to the category name). Does anyone have any ideas on how we can fix this?

Thank you!

find_real_file.png

1 ACCEPTED SOLUTION

Hi, 

 

You can update the scriptt as mentioned below, just add the sys_id of the category you want to omit from seaching.

 

sc = new sn_sc.CatalogSearch().search(portalValue, '', query);
sc.addQuery('sys_class_name', 'NOT IN', 'sc_cat_item_wizard');

// Replace sys_id with the category sys_id that should not be included in search
sc.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY^category!=sys_id');

View solution in original post

7 REPLIES 7

Hi, 

 

You can update the scriptt as mentioned below, just add the sys_id of the category you want to omit from seaching.

 

sc = new sn_sc.CatalogSearch().search(portalValue, '', query);
sc.addQuery('sys_class_name', 'NOT IN', 'sc_cat_item_wizard');

// Replace sys_id with the category sys_id that should not be included in search
sc.addEncodedQuery('hide_sp=false^ORhide_spISEMPTY^category!=sys_id');

That worked perfectly, Sagar! Thank you very much!

scott barnard1
Kilo Sage

Hi Shoobadoop

On your catalog item there may be a tick box called "hide on service portal"

Tick this box on the items you don't want to see on the portal

 

Regards