I’m working on a pagination solution for atlas search based on this community link and this page
When I was testing it, I found that the searchAfter works ok, I selected the latest pagination token from my previous query and return the next results, but the searchBefore, with the same pagination token returned the same results as searchAfter.
Hi @Jose_Salina , can you share an example of your query? This may be caused by multiple documents having the same score, so please ensure that you have added a unique sort field.
If multiple documents in the results have identical scores, Atlas Search returns arbitrarily ordered results. To return documents in a determined order, use a unique field to sort your query results.