Added field.isSortedAscending so that we can support both asc and desc sort order.