Skip to content

Incorrect filtering of properties #1054

Open
logseq/logseq
#13885

Description

@LittleKing112

Search first

  • I searched and no similar issues were found

What Happened?

I seem to have an issue where the databases don't correctly filter properties. For example, I have set a property called 'author'. When I try to filter a specific author only one name with that property will show up. If I filter the exact same property again all of a sudden all of the names with that property will show up. At the top of the database it will say 'Author is ...' twice to indicate that I filtered the same property twice. If I remove one of these filters, they both disappear. Not all the properties have this issue. The properties with a set number of options ,like status or priority for example don't have this problem.

Reproduce the Bug

  1. Go to a tag.
  2. At the top of the database, click the filter icon.
  3. Select property 'author'.
  4. Only one name will show up even if you have more names with the same property.

Expected Behavior

When I select a property to filter, I expect all of the names with that property to show up in the database.

Screenshots

Screen.Recording.2026-08-09.at.20.43.58.mov

Desktop or Mobile Platform Information

App Version: 2.0.1
Git Revision: b09316a
Platform: Mozilla/5.0 (Macintosh Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Logseq/2.0.1 Chrome/148.0.7778.180 Electron/42.3.0 Safari/537.36
Language: en-US
Plugins: logseq-bullet-threading (v1.1.4), logseq-heatmap (v2.4.3), logseq-journals-calendar (v0.11.1), logseq-luma (0.3.1), logseq-markdown-table (v1.9.0), logseq-tabs (v1.19.4), logseq-wordcount-plugin (v2.4.3)

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. transferred this issue fromlogseq/logseqon Aug 17, 2026
  2. yuxi-liu-wired commented on Sep 26, 2026

    @yuxi-liu-wired

    This looks like it comes from the fast path for single-clause filters.

    Reproduction on master 16c4ed1a0: 2 blocks tagged the same, each with the text property note set to the same text. A filter note is <that text> shows both blocks in the tag's table, and only 1 in a query table or a grouped table over the same blocks. Adding the same clause a second time shows both, as described above.

    Each block's text value is its own value block (find-or-create-property-value, deps/outliner/src/logseq/outliner/property.cljs), and the filter's value list keeps 1 block per label (get-view-property-values, distinct-by :label). For a single :is/:is-not clause on a ref property, build-fast-filter-pred (deps/db/src/logseq/db/common/view.cljs:298) matches value block ids, so only the block whose value block was listed matches. With 2 clauses the fast path does not apply, and row-matched? compares the text, so all blocks match. Properties with choices (status, priority) share 1 value block per choice, which is why they are not affected.

    Found with a model-based property test of table views, replayed on upstream master 16c4ed1a0.

  3. yuxi-liu-wired commented on Oct 27, 2026

    @yuxi-liu-wired

    Fixed in logseq/logseq#13884 (fix(views): table filters keep working when a clause is empty or matches text values). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.

  4. added 5 commits that reference this issue on Oct 28, 2026
    0aca17f
    016b312
    df56949
    47ae72a
    751cbcd
  5. added 8 commits that reference this issue on Nov 11, 2026
    845d688
    b1371d7
    da8aac4
    6e86649
    668c98c
    4535263
    158fc29
    b3128e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions