Skip to content

Instantly share code, notes, and snippets.

@micklaw
Created May 8, 2015 15:40
Show Gist options
  • Save micklaw/bb9d2395e4598c3a73b7 to your computer and use it in GitHub Desktop.
Save micklaw/bb9d2395e4598c3a73b7 to your computer and use it in GitHub Desktop.
Custom Examine Indexer
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