Assest Rule and Elastic Search

I have created a rule to index my assets into Elastic Search like example

event.type == ‘Created’ || event.type == ‘Updated’ || event.type == ‘Deleted’

but I would like to create a rule that sends assets to elastic search only if they are linked to a published content and removed if the content is deleted. It’s possible?

thanks,
Federica

Current behavior

Expected behavior

Minimal reproduction of the problem

Environment

  • [X ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [5.7.0 ]

Browser:

  • [ X] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

No :wink: … as simple as that.