I am running a fairly simply query where I am looking for the count of snapshots on Tasks between a certain time frame. Assuming dates d1, d2 and d3 where d1 < d2 < d3 I would expect that the count of snapshots between d1 inclusive and d2 exclusive plus the count of snapshots between d2 inclusive and d3 exlusive should be equal to the count of snapshots between d1 inclusive and d3 exclusive. However, I am consistently getting different counts... the count between d1 and d3 is larger than the sumation of the individual queries.
---- CASE 1: 01/13 – 01/15 Input
{
find:{
"_TypeHierarchy":"Task",
"_ValidFrom":{"$gte" : "2013-01-13T00:00:00.000Z"},
"_ValidTo": {"$lt" : "2013-01-15T00:00:00.000Z"}},
fields:["_id","ObjectID","_SnapshotNumber","_ValidFrom","_ValidTo"],
pagesize:1
}
Output
"TotalResultCount": 559,
---- CASE 2: 01/13 – 01/14 Input
{
find:{
"_TypeHierarchy":"Task",
"_ValidFrom":{"$gte" : "2013-01-13T00:00:00.000Z"},
"_ValidTo": {"$lt" : "2013-01-14T00:00:00.000Z"}},
fields:["_id","ObjectID","_SnapshotNumber","_ValidFrom","_ValidTo"],
pagesize:1
}
Output
"TotalResultCount": 52,
---- CASE 3: 01/14 – 01/15 Input
{
find:{
"_TypeHierarchy":"Task",
"_ValidFrom":{"$gte" : "2013-01-14T00:00:00.000Z"},
"_ValidTo": {"$lt" : "2013-01-15T00:00:00.000Z"}},
fields:["_id","ObjectID","_SnapshotNumber","_ValidFrom","_ValidTo"],
pagesize:1
}
Output
"TotalResultCount": 498,