We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example, for the given document
<?php namespace Acme\AcmeDemoBundle\Document; use ONGR\ElasticsearchBundle\Annotation as ES; use ONGR\ElasticsearchBundle\Document\DocumentInterface; use ONGR\ElasticsearchBundle\Document\DocumentTrait; /** * @ES\Document */ class Content implements DocumentInterface { use DocumentTrait; /** * @var string * * @ES\Property(name="name", type="string") */ private $name; /** * {@inheritdoc} */ public function getName() { return $this->name; } /** * {@inheritdoc} */ public function setName($name) { $this->name = $name; return $this; } }
If you create one
$manager = $this->get("es.manager"); $content = new \Acme\AcmeDemoBundle\Document\Content(); $content->setId("myCustomId"); $content->setName("Acme"); $manager->persist($content); $manager->commit();
When you try to update an existing document you never can update it
$manager = $this->get("es.manager"); $repository = $manager->getRepository('AcmeDemoBundle:Content'); $document = $repository->find('myCustomId'); $content->setName("Another Name"); $manager->persist($document); // The persist method never send an "update" bulk operation to elasticsearch $manager->commit();
And look in the index
curl -XGET localhost:9200/my_index/my_type/_search?pretty
The content never change. I think that the problem is in the persist method of the Manager class https://github.com/ongr-io/ElasticsearchBundle/blob/master/ORM/Manager.php#L103-L107 that always sends the "create" operation. The Connection class never send any update option upsert, doc_as_upsert ... in the bulk method https://github.com/ongr-io/ElasticsearchBundle/blob/master/Client/Connection.php#L93-L115
The text was updated successfully, but these errors were encountered:
retey ongr-io#3
b78ce47
Successfully merging a pull request may close this issue.
For example, for the given document
If you create one
When you try to update an existing document you never can update it
And look in the index
The content never change. I think that the problem is in the persist method of the Manager class https://github.com/ongr-io/ElasticsearchBundle/blob/master/ORM/Manager.php#L103-L107 that always sends the "create" operation. The Connection class never send any update option upsert, doc_as_upsert ... in the bulk method https://github.com/ongr-io/ElasticsearchBundle/blob/master/Client/Connection.php#L93-L115
The text was updated successfully, but these errors were encountered: