Scan & Scroll w/o Skipping the First Lines?
See original GitHub issueHopefully this is an easy one.
I’m scanning & scrolling as such:
var scanResults = esClient.Search<DeliveryEvent>(s => s
.From(0)
.Size(10)
.MatchAll()
.Query(q => q.Term(f => f.UserID, user)
&& 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")))
.SearchType(Nest.SearchType.Scan)
.Scroll("60m")
);
var results = esClient.Scroll<DeliveryEvent>("1m", scanResults.ScrollId);
while (results.Documents.Any())
{
results = esClient.Scroll<DeliveryEvent>("1m", results.ScrollId);
do some more stuff
}
}
I’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.
Thx!
Issue Analytics
- State:
- Created 10 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
[BUG] Scanner skipping rows occasionally · Issue #321
It looks like the first row being skipped is always row number 56. After scrolling to the page beginning in row 56, the...
Read more >file io - Java - Scanner Class - Skipping over the first line ...
When using a Scanner object to read from a textfile, I want it to skip over the very first line in the file....
Read more >Scanner skipping first line : r/javahelp
Basically, I am trying to sum up the third column, however, it is skipping over the first line. Does anyone know how to...
Read more >How to Fix Mouse Scroll Wheel Jumping in Windows 10 ...
Go to the Wheel tab. Under Vertical Scrolling, lower the number of lines that the mouse wheel can scroll. Now, move to the...
Read more >Smooth scrolling through pages
Solved: Hello, I am using Acrobat X. I have noticed that with some PDF documents I can smoothly scroll from one page to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@nasreekar Glad it’s working! That cold was a bit old so perhaps the namespaces are a bit different now. Glad I could help.