Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mskutta
Created November 2, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mskutta/4801a19f9161aec4eb1accd0f5c020d2 to your computer and use it in GitHub Desktop.
Save mskutta/4801a19f9161aec4eb1accd0f5c020d2 to your computer and use it in GitHub Desktop.
Sorting Sitecore Items by Popularity using xDB
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