pjeby / tag-wrangler

Rename, merge, toggle, and search tags from the Obsidian tag pane
607 stars 18 forks source link

Tag search aliases? #97

Closed Drakemoor closed 1 year ago

Drakemoor commented 1 year ago

Hi, I'm new to tag wrangler, so excuse me if this question is stupid. I looked, but I couldn't find the answer anywhere.

Shouldn't the results include the notes with that tag aliases when I search for a tag?

Tnx.

pjeby commented 1 year ago

No. A tag page is information about the tag, not a page tagged with the tag.

Drakemoor commented 1 year ago

I understand that. But maybe I didn't ask the right question. So, here's one example:

Note 1

---
tag: tag1 
---
Note 1 text

Note 2

---
tag: tag2 
---
Note 2 text

tag’s page tag2

---
Aliases: [ "#tag2", "#tag1" ]
---

When I search for tag1, I expect the results to show both notes: Note 1 and Note 2, since tag1 is an alias for tag2, but it doesn’t. Shouldn’t that be the case?

I appreciate your help.

pjeby commented 1 year ago

tag1 is not an alias for tag2. They are both aliases for the tag page.

Basically, your third example is a tag page that will appear if you alt/opt-click either tag 1 or tag 2. It is not a page that is tagged with either tag 1 or tag 2 (like the first two notes).

Think of it this way. Let's say tag1 and tag2 were #Daschund and #Chihuahua, and the notes containing them are "Rover" and "Fido". The third note is "Dogs".

So when you search for #Daschund it wouldn't make sense to pull up the "Dogs" page because the dogs page is not a dog. It is the concept of "dogs" in general. So you only see notes that have been tagged as a kind of dog -- i..e a note about each dog that is of that specific breed.

The only reason to have multiple aliases in a tag page is when they are tags that are related to each other and you want to provide some kind of overview related to the idea those tags represent. They are aliases for the page (i.e. alternate ways to open or link to the page) not aliases for the tags.

Drakemoor commented 1 year ago

Thank you for the detailed explanation.