[CORE-5117] Implemented search sorting.