diff --git a/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php b/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php index 1f818ca..9f05fce 100644 --- a/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php +++ b/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php @@ -81,6 +81,8 @@ public function process(Message $message, Context $context): Result $persister->deleteOne($object); } } + + $repository->clear(); return Result::ack(); case self::INSERT_ACTION: @@ -93,6 +95,8 @@ public function process(Message $message, Context $context): Result if ($persister->handlesObject($object) && $this->indexable->isObjectIndexable($index, $type, $object)) { $persister->insertOne($object); } + + $repository->clear(); return Result::ack(); case self::REMOVE_ACTION: