Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Anyone know how to reindex a single node in ExternalIndex in v8?
I used to do the following in v7
public static class LuceneHelper
public static void ReindexNode(int id, string indexName, string indexType)
var xmlStr = umbraco.library.GetXmlNodeById(id.ToString()).Current.OuterXml;
var xml = XElement.Parse(xmlStr);
I'm not sure how you get the XML for a node now in v8, but hopefully it gives you a starting point.
I simply use this:
ExamineManager.Instance.Indexes.FirstOrDefault(i => i.Name == "ExternalIndex")?.IndexItem(new ValueSet(id));
where id is string
Ooh, didn't know you could just new ValueSet(id)
I got it working by doing
index is the IIndex, _valueSetBuilder is IPublishedContentValueSetBuilder, and e is coming from the Published event on the content service
I think you have to do it your way. Unless I'm missing something, new ValueSet(id) will just create an object with that ID and no other fields populated, so indexing that won't do the right thing.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted