FOSElasticaBundle icon indicating copy to clipboard operation
FOSElasticaBundle copied to clipboard

One to many records not updating in child objects

Open arshad111 opened this issue 3 years ago • 2 comments

Hi I have below configuration. FOSElasticaBundle : 6.0.0-beta3 Elasticsearch: 7.10.2 ruflin/elastica : ^7.0

i am getting one issue that the relationship record does not updated in my current index. Please find my fos_elastica.yaml

` fos_elastica:

clients: default: { url: '%env(ELASTICSEARCH_URL)%' }

indexes:

drawings:
        settings:
            index:
                analysis:
                    analyzer:
                        name_analyzer:
                            type: standard


        properties:
            name_suggest:
                    type: completion
                    analyzer: name_analyzer
                    search_analyzer: name_analyzer
            id:
                fielddata: true
            name:
                # type: ~
                fielddata: true
            is_deleted:
                # type: ~
            create_by:
                # type: ~
            create_time:

            keywords:
                type: object
                properties:
                    keyword_name:
                        type: ~
                        fielddata: true


        persistence:
            # the driver can be orm, mongodb or phpcr
            driver: orm
            model: App\Entity\Drawing
            provider: ~
            finder: ~
            listener: ~ 

arshad111 avatar May 12 '21 08:05 arshad111

Hi @arshad111,

You will probably have to add some listener on the relationship entity so that its triggers re-index.

deguif avatar May 12 '21 10:05 deguif

Hi @deguif , Can you please help me how to add listener on the relationship entity as per my fos_elastica.yaml file and FOSElasticaBundle : 6.0.0?

arshad111 avatar May 12 '21 10:05 arshad111