elastic version : 6.4.2
Let's say page size is 10, shard count is 1, the matched total hits is 100.
If we set terminateAfter to 10, we can optain the first page. Then we use searchAfter to get the second page, will get nothing. It seems the docs before searchAfter offset also increased the collect count, so it terminate more earlier than it should be.