Search dates in properties is buggy

Steps to reproduce

  1. Open graph view.
  2. Expand Groups section, click New group and select [property] and then any property.
  3. Result in search field is, e.g. ["date":.

Did you follow the troubleshooting guide? Y

Expected result

Appending a date, e.g. ["date": 2023-10-10], should filter by date and the specified value, colouring the matching nodes. The spacing before or after : shouldn’t cause the filter to fail, and neither should the key or value being, or not being, double-quoted (only if the key/value contains [/] should double-quotes be necessary. This presumes defining a property filter using square brackets notation is the desired way to filter properties.

Actual result

All nodes with the date key are coloured correctly for ["date":, however adding a value does not work, e.g. ["date": 2023-10-10]. The only notation for filtering by property values which I found to work is "key: value".

Without encapsulating double-quotes surrounding entire term, the filter won’t work. If a property which is filtering has its double-quotes removed, the nodes will remain coloured which falsely communicates that the filter is still matching: "key: value" (nodes colour as they should) → key: value (remove quotes, still coloured) → key: non-existent-value (still coloured).

If ["date": is what Obsidian is auto-suggesting upon selecting the date key, filtering with this notation is what should work.

Environment

SYSTEM INFO:
	Obsidian version: v1.4.14
	Installer version: v1.4.14
	Operating system: Windows 10 Pro 10.0.22621
	Login status: not logged in
	Insider build toggle: off
	Live preview: off
	Legacy editor: off
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

I initially discovered this issue via the graph view’s group feature, which it then dawned on me that it’d likely be also an issue with Search, and it is. There are some similar topics on the forum but I couldn’t find what looked to be the same problem, but I could be wrong.

Thanks.

Let’s put the graph view aside. Show me your notes and show me the query you use in the regular search.

Good job for asking: Working in Search instead of the graph view helped to reveal my silly mistake: date: is a blank key I’ve not yet utilised in my front matter, yet I do have created_date: in use, which this what the query was matching in the "date: val" form (I assume this is just a plain content search). I was further mislead by my initial tests which were attempting to match ["publish": true], when booleans aren’t supported yet, a feature request I believe you’ve created.

In short, ["date": 2023] does work when date: has a 2023 value. The topic can be closed, however the criticisms of the graph view’s group filter not updating colours once the term doesn’t match any longer still stands.

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