Hi, I have implemented a search-after pattern in my Elasticsearch implementation with a hope of solving duplicate issue we are currently facing. On the first request, I am getting a batch of 100 and then get the raw_score and id.keyword of the last result and then use it to query the next batch using search_after pattern. So I am getting search batch 1-2-3-4 and then paging backward from 4-3-2-1. So after making a complete round i.e 1-2-3-4 and 4-3-2-1 and then try to make another query 1-2-3-4, I am getting some results in 2 that are already in 1. What could be causing the duplicates, yet search of batch 2 is searched using the search_after parameters for the last result in batch 1?
I followed this guide here