Unexpected Behavior from “Does Not Contain” Filter

Steps to reproduce

  1. Create five files, file1, file2, file3, file4, and file5
  2. Give them all the property project: "myproject”
  3. Give file1 the tag mytag
  4. Give file2 the tag archive
  5. Set up file3 with an empty tag property, like this: tags:
  6. Set up file4 with an empty tag property, like this: tags: []
  7. file5 should have no tag property at all.
  8. Create a Base with two filters: project → is → myproject and tags → does not contain → archive

Expected result

I expect all files to be included in the base, except for file2 because it has the archive tag.

Actual result

Only file1 and file4 are included in the base. I understand if excluding file5 is intended behavior. but I’m surprised to see file3 handled differently than file4, since they’re both considered “Empty” when viewing in Live Preview mode.

Environment

SYSTEM INFO:
Obsidian version: v1.9.2
Installer version: v1.7.4
Operating system: Darwin Kernel Version 24.5.0: Tue Apr 22 19:52:00 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6031 24.5.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: Minimal v7.7.19
Snippets enabled: 4
Restricted mode: on

Whether this will help or not, I suggest you download and reinstall Obsidian. You have an old installer, and you likely want to be on at least 1.8.9.

1 Like

From my various tests :smile: : the tags key in file3 :

---
tags: 
---

… corresponds to null.

While the tags key in file4:

---
tags:  []
---

… corresponds to blank.

So while they both appear as Empty in Properties in Live Preview, they’re actually not the same underneath.

The difference can be seen when you search for the tags property :blush:

You could try to play around with an is empty condition :blush: (which I think handles both null and blank values now … but I think it also returns files where the key doesn’t exist so you might need to filter out the unwanted files using something like: note.keys().contains("tags"))

This could also be useful: Bases Migration/Quick Start Guide

Thanks, we will think about this.