Problem
I am trying to pull about 20,000 documents from docdb. To reduce the amount that I get, I just pull out the document id. I look at the results, and when I created the list after that, I found that the number of results changes (and they are all wrong!). He does not get all the results that he has to do. There are no other processes that currently concern data.
Here is an idea of how I ask:
var sql = new SqlQuerySpec(@"SELECT items.id FROM items WHERE items.foo = @bar")
{
Parameters = new SqlParameterCollection { new SqlParameter("@bar", bar) }
};
var feedOptions = new FeedOptions { MaxItemCount = 2000 };
var query = this.Context.Client.CreateDocumentQuery<Foo>(dbSelfLink, sql, feedOptions).AsDocumentQuery();
var ids = new List<string>();
while (query.HasMoreResults)
{
var page = await query.ExecuteNextAsync<Foo>().ConfigureAwait(false);
ids.AddRange(page.AsEnumerable());
}
I ran this three times during debugging and got three different identifiers:
19,323
19,321
19,327
And not one of them is as high as I expect. They are within 100 or so of what I expect.
What I ruled out
, ( - S2), , . S3, , , .
, , . !
. .
2
, ... , , , , . , , , ( , ). :
{
"indexingMode": "Lazy",
"automatic": true,
"includedPaths": [
{
"path": "/",
"indexes": [
{
"kind": "Hash",
"dataType": "Number",
"precision": 3
},
{
"kind": "Hash",
"dataType": "String",
"precision": 3
}
]
},
{
"path": "/\"_ts\"/?",
"indexes": [
{
"kind": "Range",
"dataType": "Number",
"precision": 6
},
{
"kind": "Hash",
"dataType": "String",
"precision": 3
}
]
}
],
"excludedPaths": []
}
MaxItemCount, -1 .