Adding sorting to search results.