Move secondary index docs out of transactions