Problems with terminateAfter Java API

Hello guys, I'm using the java API with RestHighLevelClient currently I have more than 100.000 documents and using the scroll I'm getting the results perfectly applying a date order, returning this way: 154238, 154237, 154236 ... However, I use the terminateAfter to limit the results, for example bringing only 1000 documents, instead of returning the last 1000 it is returning the following documents 12161, 12160, 12159 ... What can be wrong with using terminateAfter? Thanks.

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