RavenDB Map-Reduce Example using .NET Client

I'm looking for an example of how to implement and use Map-Reduce within the RavenDB .NET Client.

I'd like to apply it to a specific scenario: generating unique and total visitor counts.

A sample document that would be stored within RavenDB:

public class StatisticsEntry
{
    public string Id { get; set; }
    public string UserId { get; set; }
}

I can figure out how to create a standard index using Map, but I'm lost as to how to actually use the Reduce function, and then retrieve the results.

Unfortunately, the example provided on the RavenDB Site doesn't explain what's going on so that I can understand how to use it via the .NET API, and the samples don't seem to implement this at all using the .NET API.

22
задан 23 November 2010 в 10:28
поделиться