Using search_after instead of scroll API .NET client

I am migrating from NEST client to .NET client version 8.
I want to get all the ids that I have in elasticsearch, which is a large amount, larger than 10000.
In the .NEST client, I did this by using the scroll API, but I saw in the documentation that it is recommended to use the search_after api. Could anyone help me by giving an example in .NET client version 8, of how to use search_after. to get a large amount of documents?
Thanks!

Thanks!

Here’s the translation:

Let me know if this helps you: Elasticsearch Pagination Techniques: SearchAfter, Scroll, Pagination & PIT

Thanks so much! This is very helpful!
But I am looking for examples how to implement the search_after with the .NET client in c#. I am trying to find documentation and examples of how to use this new client in elasticSearch, but there is very little to find.
Would you be able to help me with this?

Hi @AMElastic

In an attempt to help you, I think you can adapt the previous blog with the Elastic documentation, especially these two links:

I hope this helps, and please share your results with us.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.