Help somebody Who knows, fosElasticaBundle not upload nested entity, why ?? I have question, when I create talent in elastic don't upload nested entity but when EDIT this talent - nested field upload in elastic. Why if create talent nested not upload only when EDIT?? when created:
$user->setDeveloper($developer);
$this->getDoctrine()->getManager()->persist($user);
$this->getDoctrine()->getManager()->persist($developer);
$manager->flush();
when updated:
$manager->flush();
config:
fos_elastica:
clients:
default:
host: %elastica_host%
port: %elastica_port%
headers: { Authorization: Basic %elastica_auth_header% }
indexes:
profile:
finder: ~
types:
talent:
mappings:
id:
type: integer
slug:
type: string
description:
type: string
user:
type: "nested"
properties:
id: ~
username:
type: string
when I change nested entity - first User thean developer everything ok, now
talent:
mappings:
id: ~
username:
type: string
firstName:
type: string
developer:
type: "nested"
properties:
id:
type: integer
slug:
type: string
but I have entity team in team have nested entity developer who look in developer in developer nested users. And hen I create developer for team in elastic team not update, only when I edit team, how fix this problem maybe overwrite some listener I don't know. When I create developer I flush team for this developer but still not update in elastic
indexes:
profile:
finder: ~
types:
team:
mappings:
id:
type: integer
slug:
type: string
developers:
type: "nested"
properties:
id:
type: integer
slug:
type: string
user:
type: "nested"
properties:
id: ~
username:
type: string
firstName:
type: string
this my listener, maybe need custom insert like this?
listener:
insert: true
update: true
delete: true
But I think if listener: ~ this all variant or not ?
persistence:
driver: orm
model: Artel\ProfileBundle\Entity\Developer
provider: ~
listener: ~
finder: ~
I try like this, but still nested entity not upload in elastic
listener:
immediate: true
And I try this, but still not upload nested(and ~ this is default insert, update, delete)
listener:
insert: true
update: false
delete: true
help please