Symfony2 FOSElasticaBundle update index for all entities related to the entity updated

前端 未结 7 1514
無奈伤痛
無奈伤痛 2020-12-30 06:07

I\'m using FOSElasticaBundle and Doctrine in my project, and my code works for the selective index update using the Doctrine lifecycle events. The issue I come up against is

7条回答
  •  太阳男子
    2020-12-30 06:34

    I'm using FosElastica 3.1.0 and I have tried the solution provided by Julien Rm without success :-(

    After many days of research, I finally found the solution here

    $persister = $this->get('fos_elastica.object_persister.jaiuneidee.post');
    $persister->insertOne($post);
    

    Hope this help !

提交回复
热议问题