Expand my Community achievements bar.

com.day.cq.tagging.impl.TagGarbageCollector Functionality

Avatar

Level 1

Hi Everyone,

I have a scenario where i need your suggestions/information.

Take a scenario where you've added a tag to a page and then deleted it. If you then go into that page to look at the tags associated with it via a UI, that tag will not show up. However, if you go into CRX/DE you will still see it associated with a page.

If you perform a search via the TagManager API it will not find any pages associated with the deleted tag either.

So, we decided to override the functionality of tagmanager delete functionality and implemented as when anyone tried to delete the tag in tagging console. It first shows the references of tag on all the pages and then if we confirm the deletion. We have executed a servlet where it deletes the tag's on all the referenced pages.

But this will work for the tag's that we delete them from now. I am looking for a solution for deletion of non existing tags on already referenced pages.

I read in some article that, from AEM 6.0 on wards we have a job called com.day.cq.tagging.impl.TagGarbageCollector. Where it deletes all the non existing tags on the pages if they are unused. I tried to check if this can help. But unfortunately, i see this is not working. Could some one help in suggesting if i am missing anything.

1 Reply

Avatar

Level 2

I appreciate it's an old post from 2017 and I am responding in 2023 Nevertheless...

 

I don't think the Garbage Collector works that way. I think it just keeps the footprint of the /content/cq:tags minimal. Hope you found a good solution though. Personally, I think it's a process issue and making sure your search and view layers ensure that deleted tags aren't surfaced in any way.