# Dealing with tag merges

When I do a search for a tag, sometimes I get tags that begin with the same characters but have additional characters. This is annoying. For example, #idea returns #idea and #idea_index. I'm using Obsidian, by the way.

I was thinking of adding a character at the end of the tags. For example, ;, , or .. But, I'd have to change the tags manually since the Tag Wrangler plugin won't let me add those characters. And that can take some time.

I could use Obsidian's tag: search operator. Instead of searching for #idea, I type tag:idea and get what I want. I'd prefer to stay software-independent, so no thank you.

I couldn't find anything on this around here or in the Obsidian forum.

• using Obsidian's operator doesn't make you software-dependent but changing tags manually does (because that can take some time so you'll never do it). If you want to change something, close Obsidian, make a backup, then run a regex find and replace on your folder. The best tool for the job is, of course, Find And Replace Text.

Obsidian probably needs to restart to refresh the changes. I don't know Obsidian so not sure how this can help you with your original problem.

my first Zettel uid: 202008120915

• @zk_1000

I don't think I understand how tag: isn't software-dependent. Other text editors don't have something like that. For example, Gedit.

Ok, fair. Gedit makes you search in the folders. Still, unless your operating system has search operators when searching in folders, forget about it.

As for changing the tags, I can use the Tag Wrangler plugin. It can do that regex thing and more.

Not really helpful, but thanks for trying. I appreciate that.

• So you don't want to merge tags, but avoid "merged" results, i.e. partial matches?

Yeah, if you want to rely on full-text search, then there's no way around adding some kind of termination symbol. But remember to add it at the end of the line, too, for uniformity so you get the last tag in the line, too. Could be , if you write comma-separated lists; could be (space) for #space #separated #tags, but that makes it harder to ensure a trailing space at the end of a line.

I usually go about this by excluding stuff that gets in the way. Search is important, but not the ultimate answer to get around. So when I survey 100 results, and 50% of them has #idea_index, I'd perform a search like #idea AND NOT #idea_index -- but that, too, depends on the way you access your notes. The Archive supports these boolean expressions. From the command line, a regular expression like #idea[^_]? could work to exclude these.

Author at Zettelkasten.de • https://christiantietze.de/

• Perhaps I shouldn't rely on full-text search. Zettelkasten software is stepping up so much on what one can do. Most even share the majority of the same features. Also, it's unlikely that they will all go to dust all of a sudden. So I think it's safe to accept search operators and regex expressions.

To put it simply, I'll use the tag: operator. It even ignores tags in code blocks! If the need arises, I will learn regex expressions and dig deeper into search operators.

Thanks for opening my eyes, @ctietze and @zk_1000. It's always a pleasure to talk with all of you.