Skip to content
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.

Temporal Map Reduce

mj1856 edited this page Jan 26, 2013 · 2 revisions

Temporal Map/Reduce is needed if you want to be able to get totals at an arbitrary point in time. This is a difficult problem to solve, and requires an advanced pattern that is currently difficult to express in RavenDB. Refer to the Employees_TemporalCount index in the unit tests for an example of how it can be done. Also be sure to look at the way that this data must be queried in order to get valid results.

There may be ways to express indexes more easily if one can predetermine specific intervals to query. For example, you might build a Foos_DailyCounts index that has the counts per day. This would probably require use of Enumerable.Range in the index map. An example of this technique is forthcoming.