Sorting added to the search endpoint