Hey,
The code under points 1 to 4 belongs to the actual elastic search request. Please create a function named "findDistinctIds(String afterKey)" and paste code (1-4) in it, the response returned by this function is iterated over in pagination in point 5. I hope it helps, thanks !!