When I query a view for keys then retrieve documents for all of those keys I get inconsistent results. Every time I run I get a different number of results even though the key count is always the same. This is freshly-loaded data that has had three days to index and quiesce. No data has been deleted. The following is the code I am running:
CouchbaseClient couchbaseClient = new CouchbaseClient(); var rows = couchbaseClient.GetView("position", "position_timeseries")
.StartKey(new object[] {"Position", 2012, 11, 1})
.EndKey(new object[] {"Position", 2012, 11, 1, "\uefff"});
var keys = rows.Select(p => p.ItemId).ToArray();
var results = couchbaseClient.Get(keys);
Console.WriteLine("{0} keys obtained, {1} items retrieved",
keys.Count(), results.Count());
And I get results like the following consecutive runs:
1235 keys obtained, 1007 items retrieved1235 keys obtained, 1021 items retrieved
1235 keys obtained, 989 items retrieved
Whereas I always get correct results when I request items singly as follows:
var results = new List(); foreach (var key in keys) { var result = CouchbaseClient.Value.Get(key); results.Add(result); } Console.WriteLine("{0} keys obtained, {1} items retrieved",
keys.Count(), results.Count());
Couchbase Version: 2.2.0 build-821
Couchbase Client Version: 1.2.9