{"action":"closed","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/715","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/715/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/715/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/715/events","html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/715","id":43591456,"number":715,"title":"Change ES data on nested object changes automatically","user":{"login":"developeryashraj","id":3704506,"avatar_url":"https://avatars.githubusercontent.com/u/3704506?v=3","gravatar_id":"","url":"https://api.github.com/users/developeryashraj","html_url":"https://github.com/developeryashraj","followers_url":"https://api.github.com/users/developeryashraj/followers","following_url":"https://api.github.com/users/developeryashraj/following{/other_user}","gists_url":"https://api.github.com/users/developeryashraj/gists{/gist_id}","starred_url":"https://api.github.com/users/developeryashraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeryashraj/subscriptions","organizations_url":"https://api.github.com/users/developeryashraj/orgs","repos_url":"https://api.github.com/users/developeryashraj/repos","events_url":"https://api.github.com/users/developeryashraj/events{/privacy}","received_events_url":"https://api.github.com/users/developeryashraj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-09-23T04:56:16Z","updated_at":"2015-03-11T05:06:28Z","closed_at":"2015-03-11T05:06:28Z","body":"```\r\ntypes:\r\n                product:\r\n                    mappings:\r\n                        title:    { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string }\r\n                        status:\r\n                        brand.name:    { search_analyzer: custom_search_analyzer, index_analyzer: custom_index_analyzer, type: string }\r\n                        brand:\r\n                          type: \"nested\"\r\n                          properties:\r\n                              status: ~\r\n                    persistence:\r\n                        driver: orm\r\n                        model: MyBundle\\Entity\\Product\\Product\r\n                        provider: \r\n                          query_builder_method: customProductQueryBuilderElastica\r\n                        listener: ~ \r\n                        finder: ~\r\n```\r\n\r\nThis is my mappings for type product. **customProductQueryBuilderElastica** contains code which populates only products which have active status and have related brand status active. It is working perfectly if i change products from my admin. \r\n\r\n**what i want to do is when i change my brand status to inactive, all related products should be removed from ES.**\r\n\r\nFor that i have used brand as nested of product and created listener for it as [explained here] (http://stackoverflow.com/questions/21909763/symfony2-foselasticabundle-update-index-for-all-entities-related-to-the-entity-u) and now i am able to change brand status for every products in my ES automatically but i want to remove such products when brand status sets to inactive. **How can this be achieved in better way?**.\r\n"}}