private void Search_BeforeBulkIndex(BeforeBulkIndexingEventArgs args) { if (args.HandlerName == "Forum Thread Content Type") { foreach (Entities.SearchIndexDocument document in args.Documents) { Entities.ForumThread thread = PublicApi.ForumThreads.Get(document.ContentId); if (thread.ExtendedAttributes["createdFrom"] != null && !String.IsNullOrEmpty(thread.ExtendedAttributes["createdFrom"].Value)) { document.AddField("createdfrom_t", thread.ExtendedAttributes["createdFrom"].Value); } } } }
private void Search_BeforeBulkIndex(BeforeBulkIndexingEventArgs args) { if(args.HandlerName == "Forum Thread Content Type") { foreach (Entities.SearchIndexDocument document in args.Documents) { Entities.ForumThread thread = PublicApi.ForumThreads.Get(document.ContentId); if(thread.ExtendedAttributes["createdFrom"] != null && !String.IsNullOrEmpty(thread.ExtendedAttributes["createdFrom"].Value)) { document.AddField("createdfrom_t", thread.ExtendedAttributes["createdFrom"].Value); } } } }