Generating index of finite-dimensional Lie algebras