Why does searching '["Tags"]' return different results to 'tag:'?

What I’m trying to do

I’m trying to understand the difference between inline tags and tags in the YAML frontmatter. I didn’t realise they were different until I noticed that searching ‘[“Tags”]’ doesn’t return inline tags.

Is it reasonable to expect inline tags to be automatically added to the YAML frontmatter?

Thank you!

["tags"] or [tags] is specifically searching the YAML/Properties for the Property tags: (with a value or not). It’s not checking for values, any #tags inline, or Obsidian’s tag index.


tag: is searching Obsidian’s tag index. These can be tags in the YAML/Properties or inline #tags.

That’s my understanding anyway.

1 Like

Thanks for the explanation! That makes perfect sense from a perspective of what/where the search is focused on.

I guess my question is why aren’t inline tags added to the YAML/frontmatter tags property by default - is that an intentional design choice? The help articles describe them as practically interchangeable - having two tools do almost the same thing but not sync with each other is frustrating. Is there a philosophy behind that?

I can’t speak to the design decision behind the option for tags inline or in the YAML, but I find it extremely useful myself.

While tags apply to the entire note, either inline or in the YAML, I often use tags to, well, “tag” a section of a note to easily see its context and/or jump to that section of the note. See my last screenshot: I have an ongoing list of dates that I’ve last run the internal cleaning function on my main air-conditioner. When a new date is added, I move the #maint tag to that new line.

When searching #maint, globally or in that air-conditioner note, I can immediately see the last date the cleaning was done. If this maint tag was in the YAML (of the note), it would be far less useful to me because there would be no context.

1 Like

Not everyone uses properties. For people who don’t, having “tags” properties added just because they used a hashtag would be obnoxious. Treating them as properties in the index without having them be in the properties section would trade one weirdness for another.

Obsidian had Inline tags before it gained properties. They weren’t designed together, and are an odd special case. I think it’s generally expected that people will prefer one or the other.

3 Likes

Ahh I hadn’t even thought about using inline tags as markers. Thanks for sharing the concept. Would using a Numbered List achieve your end goal the same way? I thought a bookmark would be ideal, but you can’t place them on individual lines.

Thank you for the insights. I appreciate your point about this being an odd special case :rofl:

The help docs imply that inline tags are the same as property tags though. The Properties page links straight to the Tags page rather than explaining how the default property ‘tags’ is different from an inline tag. I’m just saying they should be fully integrated/synced, or otherwise better defined as separate tools, especially with the forthcoming Bases plugin emphasising Property use.

If it’s obnoxious to have properties because an inline tag was added, can’t the frontmatter just be hidden by default?

Not in other apps that you might open the file in.

Near the bottom of the Help homepage is a link to the documentation’s GitHub where you can post feedback on the Issues page, if you’d like.

Appreciate the suggestion. Looks like there’s already chatter in this direction.