Preventing a service item from being indexed in requester search
Hi,
I’m using a bundled service item to create child tickets for a specific request. The child service items need to be available to everyon so that they can request them from the bundled service item. But I don’t want the requester to be able to submit the child service items individually.
What I’ve done to accomplish this is hidden the child service items using a portal customization. Even though the child service items aren’t visible, they do still get added to the search results list causing other service items to be placed in the back of the results and causes some issues with search.
My question is, has anyone been able to prevent search from indexing a specific service item?
Page 1 / 1
Hi @David Pietrs,
Thanks for raising this — it's a great use case!
You're right that hiding child service items via portal customization works well visually, but those items can still show up in search results, impacting the search experience.
To resolve this, you can explicitly hide specific service items from both the catalog view and the search results using custom CSS. Here’s how:
Steps:
Go to Admin → Service Desk Rebranding → Portal Customization → Custom Stylesheet
Add the following CSS code: /* Hides the service item tile from the catalog */ a.catalog-itemchref="/support/catalog/items/18"], a.catalog-itemchref="/support/catalog/items/204"] { display: none !important; } /* Hides the service item from the search results */ a.results-linkrhref="/support/catalog/items/18"], a.results-linkrhref="/support/catalog/items/204"] { display: none !important; }
Replace 18 and 204 with the actual IDs of your child service items. You can find the ID at the end of the item’s URL.
You can add more service items by duplicating the lines and updating the IDs. This approach ensures those hidden items won’t interfere with the search ranking or be directly accessible by requesters.
I hope this helps :)
Hi @jonahrich
This is the same way that I hide the service items from search and the service catalog. But it only hides the search results after they have been rendered. See the screenshot as an example.
I would like the service items to be completely removed from the search results. Not just hidden.