Add hook for custom auto-index action

This allows us to cleanly do async indexing

Change-Id: I269ecdabfc2dab319fc2c9df3b425da8912db94d