Search logic bug

Before opening a new bug report, please search the forum for duplicates and follow the Troubleshooting Guide.

  • Developer issues with the API should go here
  • Themes and Custom CSS issues should go here
  • Translations issues/improvements should be posted here
  • Obsidian Clipper Bugs should be posted here
  • Obsidian Importer Bugs should be posted here
  • For Linux, we only accept bug reports that are reproducible with our AppImage or Snap package under Gnome or KDE.

Once you’ve done the above, delete everything above this line.

Steps to reproduce

Create notes with tags not in that list, with no tags, and with random ‘#’ in the text

Did you follow the troubleshooting guide? [Y/N]

Please, follow the Troubleshooting Guide before answering Yes.

Expected result

This search should find all notes in Action Pending without the listed tags:
path:“Action Pending” -path:“Action Pending/_resources” ((-tag:1-Now) AND (-tag:2-Next) AND (-tag:Checkbook) AND (-tag:4-Later) AND (-tag:5-Waiting) AND (-tag:Handyman) AND (-tag:8-Reading-List) AND (-tag:7-Probably-Never))

Actual result

It misses notes with no tags and notes with random ‘#’ appearing in the text.

Environment

Windows 11


Additional information

This fixes it (remove the parens and the ANDs)
path:“Action Pending” -path:“Action Pending/_resources” (-tag:1-Now) (-tag:2-Next) (-tag:Checkbook) (-tag:4-Later) (-tag:5-Waiting) (-tag:Handyman) (-tag:8-Reading-List) (-tag:7-Probably-Never)

AND is not part of the search syntax. Try enabling “Explain search terms” to get breakdown of how all the text is interpreted.

a AND b is not valid, it should just be a b

You may also find the Search documentation helpful.