保存的搜索 - baddate/trilium GitHub Wiki

Trilium提供了一种将常用搜索另存为笔记树中的笔记的方法。搜索结果将作为此"saved search"笔记的子笔记出现。您可以看到它是如何工作的:

gifs/saved-search.gif

使用脚本关系保存搜索

如果保存的搜索字符串以开头=,则将以下字符串用作关系名称,并执行目标脚本以获取音符结果列表。

因此,假设搜索字符串为=handler,然后Trilium尝试找到具有名称为"handler"关系的保存笔记。关系应该指向稍后执行的脚本 - 脚本应该返回的那些应作为搜索结果的笔记列表。对于正常的属性/全文搜索不能满足所有需求的用例,可以选择这个方法。

=====================

Trilium provides a way to save common search as a note in the note tree. Search results will then appear as subnotes of this "saved search" note. You can see how this works in action:

gifs/saved-search.gif

Saved search with script relation

If saved search string starts with =, then the following string is taken as a relation name and the target script is executed to get the list of note results.

So let's say the search string is =handler, then Trilium tries to find this saved note's relation with name "handler". Relation is expected to point to script which is then executed - script is expected to return a list of notes which should be presented as search results. This option exists for use cases where normal attribute/fulltext search doesn't cover all needs.