Improve the search endpoint.