Search Indexing For Videos
Hi,
I'm trying to add a search index for video content and am running into a wall. I though that perhaps videos would be indexed with the builtin contentitems but that does not seem to be the case.
I tried the quick and dirty method from this blog post but when I add the line to register the template pipe and attempt to create a new index I'm receiving the following error:
'Could not find the specified key "VideosSearchInboundPipe" or class id "PublishingMessages"'
My inbound pipe is just a skeleton class at this point in an attempt to get this started:
class VideosSearchInboundPipe : ContentInboundPipe public static readonly string PipeName = "VideosSearchInboundPipe"; public static PipeSettings DefaultPipeInboundSettings get SitefinityContentPipeSettings ps = (SitefinityContentPipeSettings)PublishingSystemFactory.GetPipeSettings(ContentInboundPipe.PipeName); ps.ContentTypeName = typeof(Video).FullName; ps.MaxItems = 0; ps.UIName = "VideosSearchInboundPipe"; ps.PipeName = "VideosSearchInboundPipe"; //ps.ResourceClassId = typeof(CCG.ContentTypes.Experts.ExpertsResources).Name; return ps; public static PipeSettings DefaultPipeOutboundSettings get var pipeSettings = PublishingSystemFactory.GetPipeSettings(VideosSearchInboundPipe.PipeName); return pipeSettings; PublishingSystemFactory.RegisterPipeSettings(VideosSearchInboundPipe.PipeName, VideosSearchInboundPipe.DefaultPipeInboundSettings);//PublishingSystemFactory.RegisterPipeMappings(VideoSearchInboundPipe.PipeName, true, VideoSearchInboundPipe.DefaultPipeMappings);//PublishingSystemFactory.RegisterPipeDefinitions(VideoSearchInboundPipe.PipeName, VideoSearchInboundPipe.DefaultPipeDefinitions);PublishingSystemFactory.RegisterPipe(VideosSearchInboundPipe.PipeName, typeof(VideosSearchInboundPipe));PublishingSystemFactory.RegisterTemplatePipe("SearchItemTemplate", VideosSearchInboundPipe.DefaultPipeOutboundSettings, ps => ps.PipeName == VideosSearchInboundPipe.PipeName);Hi Michael,
Registering the new pipe will work when you create new indexes. For example, create a Global.asax file and put the bellow code (that is if you are not adding the code to the Initialize event of a custom module):
protected void Application_Start(object sender, EventArgs e) Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized); void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e) if (e.CommandName == "Bootstrapped") var pipeSettings = (SitefinityContentPipeSettings)PublishingSystemFactory.GetPipeSettings(ContentInboundPipe.PipeName); pipeSettings.ContentTypeName = typeof(Video).FullName; pipeSettings.MaxItems = 0; PublishingSystemFactory.RegisterTemplatePipe("SearchItemTemplate", pipeSettings); After the website is restarted and you go in to create a new index you will see the result as in the attached image.