core changes for search ranking and ordering by metric