Make sure elasticsearch module does things in the correct order.