Add transform to document before index

Closes #6566
Yeah.  Doing it.