Support pagination for search.