I hope this is a good place to post this idea and would love community feedback on it. I am a researcher in engineering and am often faced with needing to perform literature reviews comparing different solutions to a similar problem. For this description, let’s say I am comparing different devices each with a different size and I want to ask the question “which of the devices I’ve researched would fit into this design?”. I would love the ability to query across all of my notes for the size of all devices and display them in one place along with other related attributes. I use the word “attributes” specifically, because this is the term Roam gives to their key-value pair system that allows you to build a table of all the times that attribute was mentioned.
However, this is not intended as a post asking for Obsidian to mirror Roam’s features. In contrast, I think Obsidian’s new nested tag feature has the opportunity to provide a significantly more elegant solution to this problem.
When I am performing the query on key-value pairs, I don’t want to find all the times “size” was assigned a value. Instead, I want to find all the times “devices/size” was assigned a value. In other words the generic tag “size” gets a qualifier from its parent tag “devices”. This way I can use the tag “size” in several contexts and each has a unique meaning. I could query for “devices/size” or “houses/size” and they would not conflict. In Roam, to do the same thing, I would need to do something like this “[[[[devices]], [[size]]]]:: size of device” which is cumbersome.
So what I am proposing is an additional syntax to go along with the new nested tag functionality in Obsidian that allows you to add a value to a given nested tag. For example “devices/size:: value”. When querying this key-value pair, you could search for “attr: devices/size” and it would list all of the values from your notes assigned to that nested tag. What’s more, it could list along side that (in a table for instance) all of the key-value pairs that share the same parent tags. For example, it would list all of the “devices/color:: value” values alongside the size values.
If the syntax is such that it can be typed in-line with your notes, then you could also query the context around when that key-value pair was assigned. Compared to Roam where attributes are their own blocks and when queried only show you the other attributes at the same block-level as the one being queried. With nested tags, this limitation would be eliminated, allowing you you query and compare values across parent tags regardless of context or “block-level”.