Trilium: [Feature Request] Add "in" operator to search to restrict it within a directory

Created on 23 May 2019  路  9Comments  路  Source: zadam/trilium

I have around 4k notes imported now to trilium and i'm loving it, however, when you have lots of notes, search becomes a problem. I see lots of noise, it'd be great if I can restrict the search with something like in:my_interested_parent_folder

For bug reports, please mention version of the application and include log files from following location:

  • /home/[user]/.local/share/trilium-data/log for Linux
  • C:\Users\[user]\AppData\Roaming\trilium-data\log for Windows Vista and up
  • /Users/[user]/Library/Application Support/trilium-data/log for Mac OS

Most helpful comment

Hello, a workaround would be to hoist the parent and then search - while hoisted, the search results are limited to the descendants of the hoisted note.

However, I think this might be useful (especially for saved searches) anyway so I'll put this to the backlog.

All 9 comments

Hello, a workaround would be to hoist the parent and then search - while hoisted, the search results are limited to the descendants of the hoisted note.

However, I think this might be useful (especially for saved searches) anyway so I'll put this to the backlog.

Oh didn't know that, good tip! Thanks.

Having said that the problem becomes more like I'm cluttered with the whole parent breadcrumbs in the results but this is not something so important. It's useful to show the breadcrumbs.
Many parent notes /foo/bar/blah/blah2/my_interested_note

I can see how that's annoying with deep hierarchies.

But when you have e.g. "/foo/bar/blah" set as a hoisted note, then the list of search results will show only "blah2/my_interested_note" because while hoisted, everything has to be under the hoisted note.

Nice! Should use hoist more.
Thanks again. As I said original FR is not super urgent. Just dumping my ideas. Made trilium my only one notetaking tool so expect more FRs and will try to contribute myself hopefully.

I was about to post the exact same issue :)

To give some feedback, having IN parameter would be nice, the problem I have with it is the need to include the noteId in the query itself. Ideally I don't like to include noteIds in the text/scripts and prefer to leverage relations instead. One of the reasons for this is that noteIds are not completely immutable - e.g. they can change with import/export. Another is that this connection is hidden from e.g. link map.

In general search it's not possible to leverage relations since there's no associated note with that search. In case of search script we can use relations, but then this would be a "script search" only feature which is also not nice ...

Implemented in master with the proposed syntax @in=VuvLpfAPx2L9.

@zadam, as it is now implemented, a nice UX feature would be to have a Search here.. option on note title right click.
Such option would open the search bar, prefilled with '@in=NOTEID '

@nil0x42 good suggestion, just added

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tvortsa picture tvortsa  路  3Comments

lanslans picture lanslans  路  3Comments

CrashLaker picture CrashLaker  路  6Comments

TTtrace picture TTtrace  路  5Comments

hrzboy picture hrzboy  路  5Comments