Added pagination for search.