FOSElasticaBundle
FOSElasticaBundle copied to clipboard
Get child object in FOSElasticaBundle symfony
I want to get child object from my product.
Is it fos_elastica.yaml file
fos_elastica:
clients:
default: { host: elasticsearch, port: 9200 }
indexes:
photos:
types:
photo:
properties:
name: ~
sort: ~
_parent:
type: "product"
identifier: "id"
persistence:
driver: orm
model: App\Entity\Photo
provider: ~
finder: ~
products:
types:
product:
properties:
title: ~
description: ~
created_at: ~
persistence:
driver: orm
model: App\Entity\Product
provider: ~
finder: ~
How to get child field 'name' from indexes photo inside product?
Please, show some example or give some link where I can to read about it.
can you try this
products:
types:
product:
properties:
title: ~
description: ~
created_at: ~
photo:
type: "object"
properties:
name: ~
sort: ~
persistence:
driver: orm
model: App\Entity\Product
provider: ~
finder: ~