Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created June 5, 2018 19:48
Show Gist options
  • Save hishaamn/01f4ee39cc927cdf8f0ae07f503cb3ef to your computer and use it in GitHub Desktop.
Save hishaamn/01f4ee39cc927cdf8f0ae07f503cb3ef to your computer and use it in GitHub Desktop.
Processor to update the fields with the data
public class DownloadLoadFields : DownloadIndexableLoadFieldsProcessor
{
protected override IEnumerable<IIndexableDataField> GetFields(DownloadEventIndexableLoadFieldsPipelineArgs args)
{
Assert.ArgumentNotNull(args, nameof(args));
PageEventData eventData = args.EventData;
Assert.IsNotNull(eventData, "eventData");
List<IIndexableDataField> indexableDataFieldList = new List<IIndexableDataField>()
{
new IndexableDataField<Guid>("visit.InteractionId", args.InteractionId),
new IndexableDataField<Guid>("contact.Id", args.ContactId),
new IndexableDataField<string>("contact.download", args.EventData.ItemId.ToString()),
new IndexableDataField<string>("type", "assetdownloadevent")
};
return indexableDataFieldList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment