cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Occasional Advisor

Removing Large Amounts of Labels

In our community we initially allowed moderators to create new labels in addition to  pre-defined labels. However, there have been a large amount of labels created with minimal content and duplicate labels (misspellings or variations of a word). When I say large, I mean an excess of 200-300 labels.

How can I remove the labels I don't want to keep? If I delete the labels in community admin, the labels still appear in our 'label cloud' since there are KB articles or blog posts that have the old labels assigned to them.

So far, I can only figure out how to do it manually by going into each KB article and blog and removing the duplicate labels. 

Any help would be much appreciated!

 

1 Reply 1
Highlighted
Honored Contributor

@Leandra_N I see you didn't get an answer.   I've run into the same scenario myself and I do have a better way than editing each article.   I have a script you can run that uses Ruby and Curl that parses an input file and add/removes labels using an API call.   You can add/remove labels in bulk.  

What I do is go to the MODERATION tool and get a csv dump of all articles in a node (Blog, TKB, whatever).  I then use spreadsheet formulas to pull the article ID and the existing labels.  I create an input csv file out of this with one article ID and label on each line and tell it to ADD or REMOVE.   Like this:

  • 1025478 | Remove | blockbuster
  • 1025427 | Add | Test Label

Creating the input csv file is a little tedious, but it's a heck of a lot better than doing them one article at a time.   Message me if you want more information.

--
Community manager in the Micro Focus Community. My computer always used to beat me at chess, but it is no match for me now I changed the competition to kick boxing.