SiteFinity 6.3 unable to create Site Index based on node
Migrated a 3.7SP4 site to 6.3. Now trying to create site indexes and I had one in 3.7SP4 that was based on a Node. I do not see this in 6.3. Is it no longer available? Is there something that replaces it?
Thank you
Hi Cary,
Currently we do not provide an option to specify which pages the search index should be applied to. You can extend the current functionality and create a search index that applies only to a selection of pages by replacing the default PageInboundPipe with a custom one.
To do this, you need to create a class in you project that inherits from the default PageInboundPipe and to override the PushData method. In this method we will take only the pages under the group page titled "GroupPage" and then pass them to the base PushData() method, which will index only the pages under the selected group page:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using Telerik.Sitefinity.Publishing.Pipes;using Telerik.Sitefinity.Modules.Pages;using Telerik.Sitefinity.Publishing;using Telerik.Sitefinity;using Telerik.Sitefinity.Publishing.Model;using Telerik.Sitefinity.Pages.Model;namespace SitefinityWebApp public class PageInboundPipeCustom : PageInboundPipe public override void PushData(IList<Telerik.Sitefinity.Publishing.PublishingSystemEventInfo> items) List<Telerik.Sitefinity.Publishing.PublishingSystemEventInfo> myItems = new List<Telerik.Sitefinity.Publishing.PublishingSystemEventInfo>(); foreach (var item in items) PageNode node = null; if (item.Item is WrapperObject && ((WrapperObject)item.Item).WrappedObject != null) node = (PageNode)((WrapperObject)item.Item).WrappedObject; else node = ((PageNode)item.Item); if (node.Page != null && node.Page.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live) while (true) node = node.Parent; if (node.Title == "GroupPage") // this will index only one page node with its children, // don`t add items here for the pages that shouldn`t be indexed myItems.Add(item); break; if (node.Parent == null) break; base.PushData(myItems); protected void Application_Start(object sender, EventArgs e) Telerik.Sitefinity.Abstractions.Bootstrapper.Initialized += Bootstrapper_Initialized;void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e) if (e.CommandName == "Bootstrapped") PublishingSystemFactory.UnregisterPipe(PageInboundPipe.PipeName); PublishingSystemFactory.RegisterPipe(PageInboundPipeCustom.PipeName, typeof(PageInboundPipeCustom));