Skip to content

Instantly share code, notes, and snippets.

@micklaw
Created May 8, 2015 15:43
Show Gist options
  • Save micklaw/198864d9bc9087b3f755 to your computer and use it in GitHub Desktop.
Save micklaw/198864d9bc9087b3f755 to your computer and use it in GitHub Desktop.
Save new Examine Fields Event
void ExamineEvents_GatheringNodeData(object sender, IndexingNodeDataEventArgs e)
{
// [ML] - Grab any properties that have been injected via IndexingNodeDataEventArgs 'node' and input them
if (e.IndexType == IndexTypes.Content)
{
foreach (var node in e.Node.Elements())
{
if (!e.Fields.ContainsKey(node.Name.LocalName))
{
e.Fields.Add(node.Name.LocalName, node.Value);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment