Be able to search based on multiple tags instead of one.
🚀 The feature, motivation and pitch
Currently we can use :ObsidianTags to search for files with certain tags attached to them.
This is handy if the number of files that match a specific tag is not that high, but what if your tag is added to a big number of files?
Then it may be handy to reduce the number of possible file options by adding another tag, or even multiple other tags, to search for in your files.
Say I have 2 files with the following frontmatters:
file 1
---
id: Obsidian Todo
aliases: []
tags:
- todo
- obsidian
---
file 2
---
id: Obsidian how-to
aliases: []
tags:
- how-to
- obsidian
---
Now say we want to find file 2, if we search for 'obsidian' with ObsidianTags we will retrieve 2 files from which we can pick, now imagine you have not 2 files with the tag 'obsidian' but 100 files, then you would still have to scroll through all the entries to find the note that you want.
It would be good to refine your search result with another tag, like 'how-to' or 'todo' here.
- We could make use of the same telescope menu, and use a different mapping to 'store a tag' as a search tag (it would be nice if these could be listed somewhere in the telescope window, but not required).
- after storing a tag, the telescope window should refresh and only show the possible tags from that point onward, so in our previous example, if you would start with 'obsidian' as your stored tag, then the window should refresh and only should show 'how-to' and 'todo' as possible options since these are the only two tags that overlap in the files where 'obsidian' is also a tag.
- finally after pressing enter your search result should come up which shows the possible files that contain all the stored tags.
Alternatives
No response
Additional context
No response
The idea of selecting multiple tags is actually supported by telescope directly. If you press tab on a tag (telescope), it is selected as part of the select multiple option in telescope.
However, the problem with this is that currently, obsidian treats multiple Tags with disjunction instead of conjunction.