search pagination, improved search query param processing