sort doc ID