Graph searching AND+OR operation

The default search operation is the AND boolean operation:

tag:#tag1 AND tag:#tag2

I see all notes that have both tag1 and tag2. (Intersection)


I’d like to be able to also do the OR operation.

tag:#tag1 OR tag:#tag2

This would show all notes that have either tag1 or tag2. (Reunion)


There could also be an AND+OR operation that does both.

tag:#tag1 AND+OR tag:#tag2

This would show both their intersection and reunion.

  • The notes that have both tags in common are displayed normally.
  • The rest are displayed faded out.

Using colors, it would be nice to be able to see the selected tags as a kind of Venn Diagram – overlapping tags grouped in the middle, and non-overlapping tags grouped to the sides.

tag1 (tag1 AND tag 2) tag 2

2 Likes

I may be mistaken, but this is already possible as far as I know. Can you show a screenshot where this doesn’t work? Perhaps also with the queries you’re executing?

Functionally, there seems to be only one operation, AND.

tag:#tag1 tag:#tag2

Adding the AND or OR parameters between them doesn’t do anything. They’re ignored.

@danitrusca I am pretty much lost by your explanation. If you want to obtain a venn diagram, you can get it with base boolean operator and and not.

tag1 AND tag2 [intersection]
(tag1 AND (NOT tag2)) OR ((NOT tag1) and tag2) [sides]

in obsidian:

tag:#tag1 tag:#tag2
(tag:#tag1 -tag:#tag2) OR (-tag:#tag1 tag:#tag2)

2 Likes

Thanks this worked for me!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.