Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created June 5, 2018 19:35
Show Gist options
  • Save hishaamn/cc1306687c802169c2e50f4d0f4925d8 to your computer and use it in GitHub Desktop.
Save hishaamn/cc1306687c802169c2e50f4d0f4925d8 to your computer and use it in GitHub Desktop.
The implementation of the DownloadEventIndexable
public class DownloadEventIndexable : AbstractIndexable
{
public DownloadEventIndexable(PageEventData eventData, string url, Guid interactionId, Guid contactId)
{
var str = interactionId + url + eventData.DataKey;
this.Id = (IndexableId<string>)str;
this.UniqueId = new IndexableUniqueId<Guid, string>(contactId, $"downloadEvent|{str}");
this.DataSource = "sitecore_aggregation";
this.AbsolutePath = string.Empty;
this.Culture = CultureInfo.GetCultureInfo(ContentSearchManager.SearchConfiguration.AnalyticsDefaultLanguage);
this.LoadFields(eventData, url, interactionId, contactId);
}
public override void LoadAllFields()
{
}
private void LoadFields(PageEventData eventData, string url, Guid interactionId, Guid contactId)
{
this.Fields = DownloadEventIndexableLoadFieldsPipeline.Run(ContentSearchManager.Locator.GetInstance<ICorePipeline>(), new DownloadEventIndexableLoadFieldsPipelineArgs(eventData, url, interactionId, contactId));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment