Hi,
I have a requirement where I need to call and API to trigger crawler when a page is published. Purpose is to trigger crawler as soon as page is published so the content changes can be crawled.
I can do a custom workflow to trigger crawler but not sure how to trigger that custom workflow when editor hits publish.
I read two ways of doing it but not clear which option is better than the other.
First is to write custom event handler which will be triggered at page activation and executes custom workflow.
Second is to create a model and set the custom workflow and then trigger that by adding launcher with condition "jcr:content/cq:lastReplicationAction == Activate" on modified.
I am not sure if both are doable and which is the right way of doing to yield desired results without affecting performance.
Any help on this would be greatly appreciated.
Thanks in advance!