Search doesn’t like colon in name of tags

I’m not sure if this can be counted as real bug, or if this is more like technical limitation, but because the search doesn’t act as expeted bug it is :smirk:

I’m using tags, not categories, and that is one reason why I have tags as forum:guide, forum:writing, forum:faq etc. And the reason why I’m using forum prefix is I have (or will have…) similar ones in other context, as server:guide, dogs:faq and so on.

Why I use colon instead of - is really good question. Mainly because colon looks better and more structurally right. And if I’m remembering right :faq worked a bit better than -faq when searched. But strongly because Discourse allowed using colon in names of tags.

I’m quite sure this is something refently changed, but now if I start searching I get suggestions as should:

But when I add colon and continuing writing to get wanted suggestion or targeted search term this happends:

Nothing. Like it changes to plain ordinary text searching.

I can change the structure of tags, if it is absolutely must, but it is quite pain in the tender places — not as another search&replace action, but because of I and my users are used to use that structure.

1 Like

Not really solving you problem, but it works ok, when you add the # before the tag.


I think otherwise search thinks you want to use a search filter like “in:” or “status:”

4 Likes

That’s true. And educating users to use # everytime when they are handling tags or groups is one option. They already how to use @ with users — or they should know :smirk:

But the issue is colon itself. If that will be a forbidden chracter I will live with that, but until that…

1 Like

As colons have a specific purpose in search syntax you might be making a case against colons in tags here.

I wonder how many instances have used colons in their tags, and what the impact would be for prohibiting them going forward?

2 Likes

I don’t know how to even search such thing. But we are living in the world where tags are underrated big time so I would guess that not too many. But for you one big corporete client would be one too many :wink:

Colon worked earlier. But if the situation shall change to more limiting because risk of conflicts then I have to bend and start figuring out other style.

1 Like

If you look at the various advanced search filters these are all valid syntax:

in:title 
in:messages 
in:likes 
in:seen 
#support:wordpress 
tags:rest-api 
@Stephen 
before:2023-11-17 
min_posts:5 
max_posts:50 
min_views:2 
max_views:200

With the exception of the username they all rely on the colon.

Does tags: work for a tag with a colon in it? That would be a good indicator for how supportable they are as-is.

It may make most sense to prohibit the colon simply because even if search syntax were tightened up it’s not implausible for a tag to end up including one of the advanced syntax above and being even harder to differentiate.

2 Likes

Well, search works just fine, even when tags:tag:more. The issue is/was missing automatic suggestions.

But.

There is new help I didn’t noticed.

Sorry cryptic language but under search field is something like ”# filtering by category or tag”

That is direct guidance to use hashtag when searched directly a tag, for example. And without hashtag search takes a bit longer route but hits are still valid.

I’m happy as long you guys don’t remove colon from names of tags :smirk:

So, this wasn’t a bug (even it suggested earlier tags too…) but more like support/ux-ui/user-error.

2 Likes