Pagination in search method in inmemory impl