Hi, I am trying to find files with both A and B strings in them.
Things I have tried
This regexp does what I want:
/\- \[ \].*\#todo\/wip.*/
Incomplete todo item with “#todo/wip” tag.
If I were to search for “task-todo:(#todo/wip)” I would also get the correct result.
However, what if I wanted notes with “todo” and “wip” in them? Not tags, just these strings.
This search “todo wip” should, according to the documentation, create an implicit AND between “todo” and “wip” and return documents that contain both terms. This is different from “todo OR wip” in that this search would return documents that had one word or the other in them (and those with both, of course).
In fact (for me, anyway), the search “todo wip” returns “todo OR wip” results.
Can anyone explain to me if I am reading the docs wrong? And if I am, short of using a regexp, is there a way to do an “AND” search?
A search for todo wip will match any file containing both words, but the search previews will show each match of either word. If you collapse the results to show only the file names, I think you’ll find that all of the files listed contain both words (this is of course easiest to check with a small set of results). Is that what you’re seeing?
Don’t know if this is relevant, but searching for todo wip will also find words like todos, wipe, swipe, wiper, wipeout, which you can see in the screenshot below.
This could be it. I have confirmed it works like this in my work vault. I guess I was assuming any snippet relevant to the results would be present in the preview but I an see how that would be problematic if a word appeared a hundred times in a note, etc.
If I can confirm later in my other vault (the one I am using these searches in) I will update here despite feeling like an idiot for not realizing this.