Created
February 13, 2019 09:38
-
-
Save Mitya88/e8e309ad8dd879a35f48c9966e3f6eb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override bool IsExcludedFromIndex(SitecoreIndexableItem indexable, bool checkLocation = false) | |
{ | |
var obj = (Item)indexable; | |
if (!obj.Paths.FullPath.StartsWith(this.Root, System.StringComparison.OrdinalIgnoreCase)) | |
{ | |
this.Index.Locator.GetInstance<IEvent>().RaiseEvent("indexing:excludedfromindex", (object)this.index.Name, (object)obj.Uri); | |
return true; | |
} | |
return base.IsExcludedFromIndex(indexable, checkLocation); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment