LPS-31785 New pattern to fix pagination when using indexes