{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/198","repository_url":"https://api.github.com/repos/elastic/elasticsearch-net","labels_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/198/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/198/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/198/events","html_url":"https://github.com/elastic/elasticsearch-net/issues/198","id":12320435,"number":198,"title":"Scan & Scroll w/o Skipping the First Lines?","user":{"login":"jptoto","id":5830,"avatar_url":"https://avatars.githubusercontent.com/u/5830?v=3","gravatar_id":"","url":"https://api.github.com/users/jptoto","html_url":"https://github.com/jptoto","followers_url":"https://api.github.com/users/jptoto/followers","following_url":"https://api.github.com/users/jptoto/following{/other_user}","gists_url":"https://api.github.com/users/jptoto/gists{/gist_id}","starred_url":"https://api.github.com/users/jptoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jptoto/subscriptions","organizations_url":"https://api.github.com/users/jptoto/orgs","repos_url":"https://api.github.com/users/jptoto/repos","events_url":"https://api.github.com/users/jptoto/events{/privacy}","received_events_url":"https://api.github.com/users/jptoto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2013-03-22T14:12:47Z","updated_at":"2016-06-14T02:00:14Z","closed_at":"2013-04-15T01:32:03Z","body":"Hopefully this is an easy one.\r\n\r\nI'm scanning & scrolling as such:\r\n\r\n      var scanResults = esClient.Search<DeliveryEvent>(s => s\r\n                    .From(0)\r\n                    .Size(10)\r\n                    .MatchAll()\r\n                    .Query(q => q.Term(f => f.UserID, user)\r\n                        && q.Range(r => r.OnField(f => f.ReceivedAt).From(\"2013-03-06T00:00:00.000-05:00\").To(\"2013-03-25T00:00:00.000-05:00\")))\r\n                    .SearchType(Nest.SearchType.Scan)\r\n                    .Scroll(\"60m\")\r\n                );\r\n\r\n                var results = esClient.Scroll<DeliveryEvent>(\"1m\", scanResults.ScrollId);\r\n                while (results.Documents.Any())\r\n                {\r\n                    results = esClient.Scroll<DeliveryEvent>(\"1m\", results.ScrollId);\r\n\r\n                    do some more stuff \r\n                    }\r\n                }\r\n\r\nI'd like to scroll by a larger number than 10 but if I set the number high, the first scroll (                var results = esClient.Scroll<DeliveryEvent>(\"1m\", scanResults.ScrollId);) sets it ahead too far and I miss documents. Is there a way to structure this so that the first scroll I'm doing work on is at the beginning? I borrowed this structure from the NEST tests so hopefully I'm setting it up right.\r\n\r\nThx!"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/comments/225760144","html_url":"https://github.com/elastic/elasticsearch-net/issues/198#issuecomment-225760144","issue_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/198","id":225760144,"user":{"login":"jptoto","id":5830,"avatar_url":"https://avatars.githubusercontent.com/u/5830?v=3","gravatar_id":"","url":"https://api.github.com/users/jptoto","html_url":"https://github.com/jptoto","followers_url":"https://api.github.com/users/jptoto/followers","following_url":"https://api.github.com/users/jptoto/following{/other_user}","gists_url":"https://api.github.com/users/jptoto/gists{/gist_id}","starred_url":"https://api.github.com/users/jptoto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jptoto/subscriptions","organizations_url":"https://api.github.com/users/jptoto/orgs","repos_url":"https://api.github.com/users/jptoto/repos","events_url":"https://api.github.com/users/jptoto/events{/privacy}","received_events_url":"https://api.github.com/users/jptoto/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T02:00:14Z","updated_at":"2016-06-14T02:00:14Z","body":"I haven't used the clear scroll API before. As long as the file descriptors are set high on your ES servers, and they should be, It shouldn't be a problem. You can also set the scrolls to expire sooner. In the example I gave it's set to 20 minutes."}}
{"actor":{"display_login":"jptoto"}}