Hi guys!
I've been using Tiddlywiki extensively for notetaking in university over the last 3 years.
As the amount of tiddlers grew, the search results became harder and harder to read - a search with a relatively common word now easily yields 20+ results:
![Screenshot 2020-02-16 at 17.04.53.png](https://groups.google.com/group/tiddlywiki/attach/820161b2c217f/Screenshot%202020-02-16%20at%2017.04.53.png?part=0.1&view=1)
All of my tiddlers are organized using tags, in a tree-like structure. Usually there is one "root" tiddler for each course that I am or have been taking, then each chapter/topic in that course is tagged with the course name, subtopics are tagged with their main topic, and so on. For example:
![Screenshot 2020-02-16 at 17.07.21.png](https://groups.google.com/group/tiddlywiki/attach/820161b2c217f/Screenshot%202020-02-16%20at%2017.07.21.png?part=0.2&view=1)
I would like to modify the search results so that I can see, next to the title of the result, which course (i.e. "root tag") it belongs to. The problem is that the leaves in my tag tree (so for example, the "Sannon-Fano Algorithm" tiddler in the picture above) have no direct link to the related course, so there's no way to simply express that in wikitext (that I'm aware of). Could you give me some pointer as to what the best way would be to accomplish this?
The only viable option I thought of is to run a bash script to recursively process all tiddlers in my tiddlers folder, to add a field `root_topic: [[Root Topic Title]]` to each and everyone of them. Then, for all future tiddlers, I can manually (or automatically) add this field to point to the relevant root tiddler. I don't particularly like this option though so I was hoping there's some more idiomatic way to do it :-)
Thanks!