Sort search results by rank