This post was written for Symfony 2.0 long time ago. Things below may not work any more.
I used to make sure that FOQElasticaBundle is updating search index after record is created or updated, and there are listeners as specified in documentation. It works fine for basic needs out of the box, but I have some index fields, which were populated from another related objects, which I do lazy-fetch, so I ended up with this code:
The trick here is to clear doctrine entity manager and then fetch object to replace one more time.