Importing Tags into Discourse?



We’d like to be able to surface our relevant forum threads on other pages within our site, so we’d need to be able to import our own tags in bulk into Discourse to ensure that threads can be tagged using the same tagging structure as the rest of our site.

Is there a way to do this?

(Sam Saffron) #2

We only create tags on the fly as topics are tagged, the workaround would be to create a wiki topic and use the api to tag it with a few of the tags and then repeat.

How many tags are we talking here? We can look at adding an endpoint for tag creation. (I assume you are disabling tag creation from end users and only allowing mods/admins to create new tags)


Thanks Sam - we’d be looking at 100s of thousands of tags (place names).

Yes - we’d disable tag creation, and only allow tagging using our imported tags.

How would we proceed with the endpoint creation?

(Sam Saffron) #4

100s of thousands scares me, we would need to spend some time on the tags plugin to support that, we would have to store tags in a discrete table.


Yes - there’s a lot of places in the world!

So - would this be possible in the near future?

For us to use Discourse long term, and scale out to new markets, this functionality would be vital. Is it something possible for an enterprise account?

(Sam Saffron) #6

No probs, replied to you privately.

(Jeff Atwood) #7

This doesn’t really make sense; why would you have hundreds of thousands of place names? Do you really expect to have people create topics in every single one of those?

I think it would be more sensible to create just the locations that you need, as you need them. Starting with the most popular.


@codinghorror - ultimately - yes. (Well - not every single one, but we’re thinking big scale here - so certainly hundreds of locations eventually).

The problem I’m trying to figure out here is how we get our forum content, tagged in the same way as they rest of our site (which does have 100s of thousands of pages) so that forum content can be exposed in the right place on other parts of our site.

Example: we have a thread about ‘Best things to do in Budapest, Hungary’. We want to able to expose a link to this thread on our other pages about Budapest, Hungary. And to do that (I think) we need to ensure we’re tagging all content in the forum, in the same fashion as everywhere else on our site.

If there’s any other suggestions on how we could achieve this in another way - we’re all ears.


(Sam Saffron) #9

Looking at current traffic levels, why not just do it manually for now? Once a day have a moderator tag “todays” topics with all the new locations.

I know its not gold plated, but it would solve the problem for now and would probably scale fine until you have approx 50 new topics a day.

Long term what we want is a proper geotagging plugin, which feeds into suggested topics and allows for browsing via geo. However to justify building that I think you need a fairly large increase in activity.


We’ve not ‘opened the floodgates’ yet - so current traffic is just testing traffic.

What’s important to us is that there is a way to do this in future - so that we don’t invest too much in a system if it isn’t going to be compatible with our own.

(David Taylor) #11