What is known on finite dimensional nilpotent Lie algebras with maximal index ? The index of a Lie algebra is 
$\mathrm{ind}(\mathfrak{g})=\mathrm{min}_{\lambda \in \mathfrak{g}^{*}} \mathrm{dim} \mathfrak{g}^{\lambda}$, where $\mathfrak{g}^{\lambda} = \lbrace x\in \mathfrak{g} \mid \lambda\circ \mathrm{ad}_{x} = 0 \rbrace$.
Is there any way to classify all complex n-dimensional nilpotent Lie algebra $\mathfrak{g}$ whose index is $\mathrm{ind}\ \mathfrak{g} = n-2$ ?
Examples would be the filiform Lie algebras, if I am not mistaken, e.g.
$\mathfrak{g}$ generated by $\{x_1, \ldots, x_n\}$ subject to $[x_1,x_i]=x_{i+1}$ for $2\leq i < n$.
 A: It is known, that the index of a Lie algebra is a semi-invariant for degenerations
(by Ooms and Elashvili), i.e., if $L_1$ degenerates to $L_2$, then 
$ind(L_1)\le ind(L_2)$. This is very useful.
For example, it follows that any filiform Lie algebra of dimension $n$ has index
less or equal than $n-2$, where only the standard graded filiform $L(n)$, which you have
defined above, has exactly index $n-2$. 
In general, there are many other Lie algebras of dimension $n$ and index $n-2$, e.g.,
also the quasi-filiform Lie algebras $L(n-1)\oplus \mathbb{C}$. See here also the work 
Adini and Makhlouf. The Hasse-diagram of complex nilpotent Lie algebras in dimension 6
gives explicit examples, e.g., we have degenerations from the top algebra $L_{6,20}$
as follows (notation of Magnin for the Lie algebras)
$L_{6,20}\rightarrow L_{6,18}\rightarrow L_{6,17} \rightarrow L_{6,16} \rightarrow 
L_{5,5} \oplus \mathbb{C}\rightarrow \mathbb{C}^6$, with index numbers 
$2 \rightarrow 2 \rightarrow 2 \rightarrow 4 \rightarrow 4 \rightarrow 6$. See my paper
arXiv:0911.2995 for this, and a discussion on the maximal dimension of an abelian
subalgebra $\alpha (L)$, which is related to the index by  $\alpha (L)\le (\dim (L)+ind (L))/2$.
