Created
May 8, 2015 15:40
-
-
Save micklaw/bb9d2395e4598c3a73b7 to your computer and use it in GitHub Desktop.
Custom Examine Indexer
This file contains hidden or 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
public class CustomIndexer : UmbracoContentIndexer | |
{ | |
public override void ReIndexNode(XElement node, string type) | |
{ | |
this.EnqueueIndexOperation(new IndexOperation | |
{ | |
Operation = IndexOperationType.Add, | |
Item = new IndexItem(node, type, (string)node.Attribute("id")) | |
}); | |
this.SafelyProcessQueueItems(); | |
} | |
protected override IEnumerable<string> SupportedTypes | |
{ | |
get | |
{ | |
return new string[] | |
{ | |
"content", | |
"media" | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment