Add support for index ordering on metadata fields