How to use search_after with match all query and without sorting?

It needs a sort key.
The problem is that with match all you don't have anything else than _score: 1 which can't help.

I'd recommend starting again from start but sort by _uid which is anyway the most efficient.

BTW you should use scroll API instead.

1 Like