Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Setting Search to ignore content in web part View modes: 
User avatar
Member
Member
K-Guy - 4/19/2011 10:52:09 AM
   
Setting Search to ignore content in web part
Is there a way to set a web part to be ignored by Smart Search so that its content doesn't appear in the search results?

Just to be clear, I don't want the page to be ignored by Smart Search - I just want the content of 1 of the web parts on the page not to show out as part of the results.

Thanks!

User avatar
Member
Member
kentico_alleng - 4/20/2011 12:43:17 PM
   
RE:Setting Search to ignore content in web part
There are two ways I can think of that you could accomplish this.

First, for the document type containing the web part, create a custom field called, for instance, SearchResultText, and set that as the search content field. With this set, only the content of that custom field will show up in the search results preview. (Site Manager -> Development -> <Your Document Type> -> Search Fields)

Otherwise, you could create a custom function to filter out the content of the web part, based on specific text within the web part or other criteria. Under the Root document type transformations, modify SmartSearchResults and SmartSearchResultsWithImages so that results of the call to GetSearchedContent are passed through your custom function.

Regards,
Allen Greenhaw