Setting up search pagination.