Don't index inside a transaction otherwise it will fail