\documentclass[a4paper]{article}
\usepackage{makeidx,german}
\makeindex
\begin{document}
Das ist ein Text.
\index{Testindex} % abc xxxxxxxxxxxxxxx yyyyyyyyyyyyyyy abc 123456789
1234567890 zzzzzzzzzz abcdefghi abcdefghijklmnopqrstuvw  1234567890
abcde
\begin{flushright}
x %xxx

\printindex
abc
\end{flushright}
\end{document}
        aaaaaaaaaaaaa xxxxxxxxxxxxxxxxxx ccccccccccccc dddddddddd eeeeeee
  123 xxxxxxxxxxxxxxxxxxxxxx eeeeeeeee eeeeee eeeeeeee
  xxxxxx ddddddddddddddddddd
  uuuuuuuuuuuuu vvvvvvv
  xxxxxxxxx
        aaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx ddddddddd eeee
        ffffff xxxxxxxxxx 123456789012ddddddddd
        xxxxxxxxxxxxxxxxxxx
