Created
November 2, 2016 15:22
-
-
Save mskutta/4801a19f9161aec4eb1accd0f5c020d2 to your computer and use it in GitHub Desktop.
Sorting Sitecore Items by Popularity using xDB
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 Sitecore.Analytics.Aggregation.Data.Model; | |
using System; | |
namespace Website.Logic.Analytics.Views | |
{ | |
public class ViewValue : DictionaryValue | |
{ | |
internal static ViewValue Reduce(ViewValue left, ViewValue right) | |
{ | |
var viewValue = new ViewValue(); | |
viewValue.Count = left.Count + right.Count; | |
viewValue.TemplateId = left.TemplateId | |
return viewValue; | |
} | |
public long Count { get; set; } | |
public Guid TemplateId { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment