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:

// do something with $property

// reload property from the database to get saved data with all related objects needed for index
$property = $em->find('MyBundle:Property', $property->getId());

// reindex
$type = $this->kernel->getContainer()->get('');
$modelTransformer = new \FOQ\ElasticaBundle\Transformer\ModelToElasticaAutoTransformer();
$mapping = $type->getMapping();
$fields = array_keys($mapping["property"]["properties"]);

$objectPersister = new \FOQ\ElasticaBundle\Persister\ObjectPersister($type, $modelTransformer, 'My\MyBundle\Entity\Property', $fields);

The trick here is to clear doctrine entity manager and then fetch object to replace one more time.