我正在尝试获取自上次运行以来已更改的文档。当我设置ChangeFeed选项StartTime时,我没有得到任何行。设置StartFromBeginning时,我正在获取文档。
IDocumentQuery<Document> query = client.CreateDocumentChangeFeedQuery(
UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId),
new ChangeFeedOptions
{
StartFromBeginning = true,
PartitionKeyRangeId = partitionkeyRangeId,
RequestContinuation = token,
MaxItemCount = Batchsize,
// Set reading time: only show change feed results modified since StartTime
StartTime = DateTime.Now - TimeSpan.FromDays(365)
});
var temp = query.ExecuteNextAsync()。GetAwaiter()。GetResult();