Add date to block searching

Currently, blocks can be searched only by their content, but when having many similar blocks it’s getting hard to navigate.
I know when I wrote the block, so it’s only natural that I would like to search by the content and the date, but something like ((Nov 10th something...)) doesn’t work. Some sort of filtering blocks would be awesome and make my workflow (and probably the workflow of many other people) much easier.

Do you mean journal date or creation date?

Journal date. AFAIK, blocks don’t have creation date yet.

Well, you can enable creation date on blocks, but that comes with a performance cost. It is a config option.
But I do agree journal date is way more useful and it would be cool to have this functionality.

1 Like

Something like this perhaps?
This gives blocks that reference the current page in a certain time span :slight_smile:
I was looking for something similar myself and combined two different queries and it seems to work.

{:title “Query for page references & tags.”
:query [:find (pull ?b [*])
:in $ ?current-page ?start ?today
[?b :block/refs ?r]
[?r :block/name ?current-page]
[?b :block/page ?p]
[?p :page/journal? true]
[?p :page/journal-day ?d]
[(>= ?d ?start)]
[(< ?d ?today)]
:inputs [:current-page :7d-before :today]}

It looks great, if only it was integrated into search function for block refs… Well, I probably could make a plugin or custom command, but built-in stuff like that would be awesome.