The index of nilpotent Lie poset algebras