Selecting "Hide Subtag Notes" will hide notes that contain "tag" and "tag/subtag"

I think they was clear that they will keep it how it is. And as I said: in an economically sense that is definitely the right decision. A rewrite of the database is not a trivial task and not worth for a user scenario that most user are not asking for.

Therefore I have put the topic in a greater context: a database that is aware of each single tag could make many things possible. I mentioned f.e. in-note-search, but I also can think of filtering notes list by single tags or filtering of backlinks by tags, or f.e to search for quotes, list or chapters that contain a special tag

And I indeed can wait or hope until bear 3. If someday in far future that features come at all I will be prepared because I will continue to tag my notes/texts in the same way although it currently has no real benefit :wink:

As a new Bear user, I wrote a long bug report about this subtag behavior before finding this thread. Thank you to all the participants to-date.

I believe there’s a compromise path forward, by maintaining existing behavior for subtags, but making a change when the parent tag is separately and explicitly included in a note. (e.g. #a #a/b )

I’d like to add my request at a technical and a user level.

Technical

#parent/child in the note’s text results in #parent and #parent/child tag relationships in the database. My proposal is to extend the schema with an “explicit" boolean property on the tag relationship model (Z_5TAGS table), which would be set to true when the tag is present in the note text.
For a note containing only #parent/child the explicit property would be false for the relationship to #parent. If the note text instead contained both (e.g. #parent #parent/child) the explicit property would be true. The “Hide Subtags” filtering query would then need to interact so that if there were an explicit==true relationship for the current tag, the note would remain visible.

This proposal should preserve current behavior for notes containing only the #parent/child tag.

User Motivation

I have a root tag “#photography” and a subtag “#photography/dogwood challenge#” in my notes.
I have a note titled “Dogwood Photography 52 Challenges” with both root and subtag explicitly in the note, along with general information about the annual challenge, and links to the detailed note for each year ([[2017]], [[2018]], etc…). Each detailed note is only tagged with “#photography/dogwood challenge#” so that I can see the whole collection of related notes (general and each year’s) by selecting that subtag.
When I select the #photography tag, I want to see all of my photography notes, including the general note for the challenge, but not have the notes list cluttered up with each year (from this and other subtags.

Here are two screenshots showing what my desired result would be with the “Hide Subtag Notes” setting active.

Subtag view:

Root tag view:

Thanks for taking the time to read. If I can help clarify or expand anything in my post, please ask.

1 Like

As far as i have understood Matteo, one of the devs, the database is not aware of having both or more tags from same family. When a note contains a tag #a/b/c, bear doesn’t know at all if also #a or #a/b is present.

Thanks for the reply @krssno!
Your understanding is definitely correct as to the current behavior. Bear reads the text of the note, finds all the tags, de-duplicates them (so the list with a, a, b becomes a, b), and records them in its database. So the current database has no way to know #a and #a/b were present, but a future version of Bear could change that since it has access to everything that’s in the note.

I spent time exploring the structure of the database and how the contents change as I edit notes in Bear. Combining those results with my best guess at how the database queries currently operate, I made a proposal for what I hope is a backwards-compatible and minor change.

All this aside, Bear is already pretty great. :smiley: I’m sure @matteo has lots of higher-priority things to do, and I may have invented a workaround for this reality that’ll let me have my notes list work almost the way I want. That’ll be a topic for a different post, when I have time to verify and write it up properly.

1 Like

Ah Ok, sorry for misunderstanding, i thought you wanted to say that it is possible but the feature is just not implemented. To give my honest opinion: the current implementation drives me crazy. Actually i would like to use folderlike-view but cannot due to that limitation: the simple task to list all notes with a certain tag is not possible. In the current state of bear development they indeed have no time to to even think about a rewrite of the database just for the few people who indeed tag theoir notes or text with multiple tags from the same family. A new databse would make possible also other good features: f.e. to cycle inside a note through a special tag by search. I will put this on my to-do-list to ask again at summer 2024 :smiley:

1 Like

Also bumped into this issue since I would like to create an index note for a subtags within the tree (for example a table of contents note for #todos) . Contained within this file are mentions of the sub-tags (e.g. #todos/projects, #todos/checklists, #todos/single actions#) as well as an explicit mention of #todos.

Really feels it should still show up in the parent tag folder if the parent tag is mentioned explicitly even if you have I have “hide subtag notes” selected :thinking:

1 Like