Controlling what Content Blocks are searchable
Hello,
I'm wondering if there is a way to control which content blocks on a page are indexed in a search. For editing purposes, I have much of my navigation set up in Content Blocks on my site, but I want to avoid having the navigation text kick a certain page back as a search result.
Thanks,
Jeffrey Paul
Hello Jeffrey,
I believe you could create a Custom PagePipe and replace the existing one , in which you could exclude some of the rendered content of the page.
Inherit PagePipe , override the logic in ConvertImportedItemForMapping.
Attach to the event : Bootstrapper.Initialized;
Then use PipeFactory.UnregisterPipe("PagePipe");
Then use PipeFicatory.RegisterPipe("PagePipe",typeof(YourCustomPagePipe));
Greetings,
Teodor
the Telerik team
So in versions previous to 4.0, if you wanted to exclude say your footer content, you alter the setings in the xml file here: /App_Data/Search/myIndex/fieldsInfoProvider.xml
as in this article: www.sitefinity.com/.../how-to-customize-the-indexing-of-html-documents.aspx
How do we do that in 4.0 now?
Hello Laura,
There is no configuration that you can use for now and the only option is custom pipe as Teodor suggested. We are going to extend the search functionality after Q2.
All the best,
Ivan Dimitrov
the Telerik team