Updated sort for local index