We have performance issue in our live web site when we use EPiServer Find. Can I guess some answers for the following things :
1)Episerver.Find will always run at background and will always trigger EpiserverIndexingService, if so then is there a way to control it running and how to control it?
2)If we are writing some code in Globla.asax.cs file to control indexing of all the Pages in EPiServer CMS as below Is there will be any problem?
Hi
We have performance issue in our live web site when we use EPiServer Find.
Can I guess some answers for the following things :
1)Episerver.Find will always run at background and will always trigger EpiserverIndexingService, if so then is there a way to control it running and how to control it?
2)If we are writing some code in Globla.asax.cs file to control indexing of all the Pages in EPiServer CMS as below Is there will be any problem?
protected void Application_Start(Object sender, EventArgse)
{
PageIndexer.Instance.Conventions.ForInstancesOf<PageData>().ShouldIndex(x => IsIndexableCategory(x));
}
protected bool IsIndexableCategory(PageData page)
{
string categoryName = string.Empty;
Category IndexCategory = Category.Find("EPiServerFindIndexable");PageData ParentPage = EPiServer.DataFactory.Instance.GetPage(page.ParentLink);
if (ParentPage != null)
{
if ((ParentPage.Category.Contains(IndexCategory.ID)))
return true;
}
if (page.Category.Contains(IndexCategory.ID))
return true;
return false;
}
Please let me know your suggestions.