Created
December 15, 2015 08:38
-
-
Save abjerner/da14eaaace6a33da9fec to your computer and use it in GitHub Desktop.
Index a single content node in Examine
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
@using System.Xml.Linq | |
@using umbraco.cms.businesslogic.web | |
@using UmbracoExamine | |
@inherits UmbracoViewPage | |
@{ | |
// Generate an instance of XElement to be indexed | |
XElement node = new Document(Model.Id).ToXDocument(false).Root; | |
// Index the element in Examine | |
ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"].ReIndexNode(node, IndexTypes.Content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment