Here's the better solution* (as used by Sandee Cohen for the index in her popular InDesign CS6 Visual QuickStart Guide):
http://www.freelancebookdesign.com/scripts/live-index
Ariel
* Better because it has more options, and doesn't require you to use InDesign's indexing at all, as opposed to the other one, as far as I can tell.