Add support for pagination to search