How to do a category: search for multi-word categories?

So I have some categories that have one-word titles, e.g., “Foo”, and also categories that have more than one word, e.g., “Foo Bar”.

The following works for constraining search results to a category:
category:Foo or

The following does not work:
category:Foo Bar or

Meta repro:
category:discourse hub or Search results for 'category:discourse hub' - Discourse Meta

I was doing this because I wanted to put a hyperlink to such a query to show the unsolved topics in my support category, but can’t because that category has multiple words. :slight_smile:


You need to use underscores:
category:discourse_hub or

I don’t know why it doesn’t use the hyphens that the categories use in URL view, but I tried underscores because that’s what some other things use in Discourse and it worked. :slight_smile: