Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(search): show search preview by default
Elian Doran363cc29d6b7f
diff --git a/apps/client/src/widgets/collections/interface.spec.ts b/apps/client/src/widgets/collections/interface.spec.tsnew file mode 100644index 0000000000..a53b609c18--- /dev/null+++ b/apps/client/src/widgets/collections/interface.spec.ts@@ -0,0 +1,25 @@+import { describe, expect, it } from "vitest";++import { resolveViewType } from "./interface";++describe("resolveViewType", () => {+ it("defaults a saved search to the search preview and a collection to the grid", () => {+ expect(resolveViewType({ type: "search" }, undefined)).toBe("searchPreview");+ expect(resolveViewType({ type: "book" }, undefined)).toBe("grid");+ });++ it("keeps an explicit view type, including a list on a saved search", () => {+ expect(resolveViewType({ type: "search" }, "list")).toBe("list");+ expect(resolveViewType({ type: "search" }, "searchPreview")).toBe("searchPreview");+ expect(resolveViewType({ type: "book" }, "list")).toBe("list");+ });++ it("falls back when the search preview is set on a note that is not a saved search", () => {+ expect(resolveViewType({ type: "book" }, "searchPreview")).toBe("grid");+ });++ it("ignores a label naming no view type, and answers nothing without a note", () => {+ expect(resolveViewType({ type: "book" }, "bogus")).toBe("grid");+ expect(resolveViewType(null, "list")).toBeUndefined();+ });+});diff --git a/apps/client/src/widgets/collections/interface.ts b/apps/client/src/widgets/collections/interface.tsindex d25e405f4c..41f950335a 100644--- a/apps/client/src/widgets/collections/interface.ts+++ b/apps/client/src/widgets/collections/interface.ts@@ -26,7 +26,7 @@ export function resolveViewType(return undefined;}- const defaultViewType = note.type === "search" ? "list" : "grid";+ const defaultViewType = note.type === "search" ? "searchPreview" : "grid";if (!isViewType(viewType)) {return defaultViewType;}diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.jsonindex 9abd58f23c..2a0e97fd00 100644--- a/apps/server/src/assets/help/help_content.json+++ b/apps/server/src/assets/help/help_content.json@@ -73,7 +73,7 @@"_help_aGlEvb9hyDhS": "<p>Trilium can sort the child notes of a note once, using the <em>Sort by…</em> dialog, or keep them sorted permanently, using the <code>#sorted</code> label. Both sort by the same criteria: the title, the creation or modification date, or the value of a label on the child notes, and both can combine several of these into sorting levels.</p><h2>Sorting once with the dialog</h2><p>To sort the children of a note once, right-click it in the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a> and select <em>Sort by…</em>, or select it and press <kbd>Alt</kbd>+<kbd>S</kbd>. The order is applied to the existing child notes only; notes added later are placed wherever they are created.</p><p>The dialog consists of:</p><ul><li><em>Sorting criteria</em>, a list of levels. Each level sorts by <em>Title</em>, <em>Date created</em>, <em>Date modified</em> or <em>Label</em> (followed by the name of the label), <em>Ascending</em> or <em>Descending</em>.<ul><li>To sort by more than one criterion, select <em>Add level</em>. The first level decides the order; the next level only decides between notes the previous ones left equal (see <em>Sort levels</em> below).</li><li>To change the order of the levels, use the <span class=\"tn-icon bx bx-up-arrow-alt\"></span> and <span class=\"tn-icon bx bx-down-arrow-alt\"></span> buttons. To remove a level, use the <span class=\"tn-icon bx bx-x\"></span> button.</li></ul></li><li><em>Sort folders at the top</em>, which places notes that have children of their own before the others. When the first level is descending, they are placed at the bottom instead.</li><li><em>Natural sort</em>, which compares numbers and characters by the rules of a language (see <em>How values are compared</em> below). <em>Natural sort language</em> sets the language code, for example <code>zh-CN</code> for Chinese.</li></ul><p>Notes with <code>#top</code> or <code>#bottom</code> stay at the top or bottom, as with automatic sorting (see <em>Pinning notes to the top or bottom</em> below).</p><h2>Keeping child notes sorted</h2><p>To keep the children of a note sorted, add the <code>#sorted</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a> to it. Trilium sorts its child notes again whenever a child is added or changes, and whenever the sorting labels change.</p><figure class=\"table\"><table><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>#sorted</code></td><td>Keeps the child notes sorted. Without a value, they are sorted by title; with a value, by the levels it lists (see <em>Sort levels</em> below). <code>#sorted=off</code> turns sorting off.</td></tr><tr><td><code>#sortDirection</code></td><td><code>asc</code> (the default) or <code>desc</code>. The direction of every level that doesn't specify its own.</td></tr><tr><td><code>#sortFoldersFirst</code></td><td>Places notes that have children of their own before the others, or after them when <code>#sortDirection</code> is <code>desc</code>.</td></tr><tr><td><code>#sortNatural</code></td><td>Compares numbers by their value instead of character by character, so 2 comes before 10.</td></tr><tr><td><code>#sortLocale</code></td><td>The language code for <code>#sortNatural</code>, for example <code>zh-CN</code> or <code>de</code>.</td></tr><tr><td><code>#top</code></td><td>On a child note: keeps it at the top of its sorted parent.</td></tr><tr><td><code>#bottom</code></td><td>On a child note: keeps it at the bottom of its sorted parent.</td></tr></tbody></table></figure><p>The labels apply to the note that carries them and, when made <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable</a>, to every note below it, so a single <code>#sorted(inheritable)</code> sorts a whole subtree. A note created from a <a href=\"#root/_help_KC1HB96bqqHX\">template</a> that has <code>#sorted</code> keeps its children sorted too. To exclude part of such a subtree, add <code>#sorted=off</code> to the note whose children must keep their manual order; to exclude everything below it as well, make that label inheritable too.</p><h2>Sort levels</h2><p>The value of <code>#sorted</code> is a comma-separated list of levels, written like the <code>orderBy</code> of a <a href=\"#root/_help_eIg8jdvaoNNd\">search</a>. Each level is one of:</p><ul><li>A label on the child notes, written with <code>#</code>, such as <code>#priority</code>.</li><li>One of the properties <code>title</code>, <code>dateCreated</code> and <code>dateModified</code>, written without <code>#</code>.</li><li><code>folders</code>, which only the notes with children of their own have (see <em>Grouping</em> below).</li></ul><p>A level can be followed by <code>asc</code> or <code>desc</code> to set its direction; otherwise it follows <code>#sortDirection</code>.</p><p>The child notes are sorted by the first level. Notes that are equal at that level are sorted by the second level, and so on. Notes equal at every level are sorted by title, in the direction of <code>#sortDirection</code>.</p><p>A child note that doesn't have a level's label is placed after every child that has it, whichever direction the level runs in. Between two notes that both lack it, the next level decides.</p><p>For example, <code>#sorted=\"#priority desc, #dueDate\"</code> on a parent with these children:</p><figure class=\"table\"><table><thead><tr><th>Child note</th><th>Labels</th></tr></thead><tbody><tr><td>Book report</td><td><code>#priority=2</code> <code>#dueDate=2026-11-01</code></td></tr><tr><td>Groceries</td><td><code>#priority=1</code></td></tr><tr><td>Taxes</td><td><code>#priority=2</code> <code>#dueDate=2026-10-25</code></td></tr><tr><td>Ideas</td><td>none</td></tr></tbody></table></figure><p>sorts them as <em>Taxes</em>, <em>Book report</em>, <em>Groceries</em>, <em>Ideas</em>. The highest priority comes first; <em>Taxes</em> and <em>Book report</em> share it, so the earlier due date decides between them. <em>Ideas</em> has no priority and goes last.</p><p>A value that is a single name without <code>#</code> is read the way older versions did: <code>title</code>, <code>dateCreated</code> or <code>dateModified</code> is a property, and any other name is a label, so <code>#sorted=myOrder</code> sorts by the <code>#myOrder</code> label of the children.</p><aside class=\"admonition warning\"><p>Since v0.107.0, a label in a <code>#sorted</code> value with more than one level, or with a direction, must be written with <code>#</code>. In v0.106.0 the names were written bare, as in <code>#sorted=\"priority desc, dueDate\"</code>; such a value now reads both names as properties that don't exist, and the notes fall back to sorting by title. Add a <code>#</code> before each label name to restore it.</p></aside><h2>Grouping with <code>first</code> and <code>last</code></h2><p>A label followed by <code>first</code> or <code>last</code> doesn't sort by the label's value: it places the child notes that have the label, with any value, before or after the rest. The levels that follow then sort within each group. Grouping ignores <code>#sortDirection</code>.</p><p>For example, <code>#sorted=\"#archived last, #priority desc\"</code> on a parent with these children:</p><figure class=\"table\"><table><thead><tr><th>Child note</th><th>Labels</th></tr></thead><tbody><tr><td>Old project</td><td><code>#archived</code> <code>#priority=3</code></td></tr><tr><td>Draft</td><td><code>#priority=1</code></td></tr><tr><td>Launch</td><td><code>#priority=3</code></td></tr><tr><td>Meeting notes</td><td>none</td></tr></tbody></table></figure><p>sorts them as <em>Launch</em>, <em>Draft</em>, <em>Meeting notes</em>, <em>Old project</em>. The <a href=\"#root/_help_MKmLg5x6xkor\">archived note</a> goes below all the others despite its high priority, and the rest are sorted by priority.</p><p><code>folders first</code> and <code>folders last</code> group the notes that have children of their own. A <code>folders</code> level without <code>first</code> or <code>last</code> also places them first, in either direction. <code>#sortFoldersFirst</code> is a shortcut for a <code>folders first</code> level; it has no effect when <code>#sorted</code> already contains <code>folders</code>.</p><h2>Pinning notes to the top or bottom</h2><p>A child note with <code>#top</code> stays at the top of a sorted parent, and one with <code>#bottom</code> stays at the bottom, whatever the levels of <code>#sorted</code> say. When several notes have <code>#top</code>, they are sorted by the label's value, so <code>#top=1</code> comes before <code>#top=2</code>, and a <code>#top</code> without a value comes first. <code>#bottom</code> works the other way round: the last notes are <code>#bottom=2</code>, then <code>#bottom=1</code>, then a <code>#bottom</code> without a value at the very end.</p><p><code>#sortFoldersFirst</code> places the folders right after the <code>#top</code> notes.</p><p>To pin notes within groups instead of the whole list, name <code>#top</code> and <code>#bottom</code> in <code>#sorted</code> at the position where they apply. For example:</p><ul><li><code>#sorted=\"#archived last, #top first, #bottom last, title\"</code> keeps archived notes below all the others, including those with <code>#bottom</code>. <code>#top</code> and <code>#bottom</code> then apply within the archived and the non-archived group separately.</li><li><code>#sorted=\"#archived last, #top first, #bottom last, folders first, title\"</code> also places folders first within each group. <code>#sortFoldersFirst</code> does the same: its <code>folders first</code> level goes right after the last of <code>#top</code> and <code>#bottom</code>.</li><li>Written with <code>first</code> or <code>last</code>, <code>#top</code> and <code>#bottom</code> ignore their values. To order several pinned notes by value, add a level after them, such as <code>#top first, #top, #bottom last, #bottom desc</code>.</li></ul><h2>How values are compared</h2><ul><li>Values are compared as text, character by character, without regard to letter case. Dates in the <code>YYYY-MM-DD</code> form sort correctly, but numbers don't: <code>\"10\"</code> comes before <code>\"2\"</code>. Either pad the numbers with zeros (<code>02</code>, <code>10</code>) or enable <code>#sortNatural</code>.</li><li>With <code>#sortNatural</code>, numbers are compared by their value, and the comparison follows the rules of the language set by <code>#sortLocale</code> (or the default one), which also ignores accents.</li><li>The title of a note includes its <a class=\"reference-link\" href=\"#root/_help_TBwsyfadTA18\">Branch prefix</a>, if it has one in this parent, as <code>prefix - title</code>.</li><li>A label without a value still counts as present: it sorts before the notes that don't have the label, and among the notes that have it, as the smallest value.</li></ul>","_help_NRnIZmSMc5sj": "<figure class=\"image\"><img style=\"aspect-ratio:2023/1488;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Printing%20%26%20Exporting%20as%20PDF_image.png\" width=\"2023\" height=\"1488\"><figcaption>Screenshot of the Print preview functionality introduced in v0.103.0.</figcaption></figure><p>Trilium allows printing notes to a real printer, or generating a structured PDF for a single note or for multiple notes through <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>.</p><p>Note that not all note types are printable as of now. We do plan to increase the coverage of supported note types in the future.</p><p>Printing and exporting as PDF are not perfect. Due to technical limitations, and sometimes even browser or Electron glitches the text might appear cut off in some circumstances. </p><h2>Printing a note or exporting as PDF on the desktop</h2><aside class=\"admonition note\"><p>Versions prior to v0.103.0 had two different options, one for printing and another one for exporting to PDF. With the introduction of the print preview, these functions have been unified.</p></aside><p>On the desktop application of Trilium it is possible to export a note as PDF. To print a note:</p><ul><li>Press the menu button in the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and select <em>Print/export to PDF…</em>.</li><li>Alternatively, printing can be triggered from a <a href=\"#root/_help_A9Oc6YKKc65v\">keyboard shortcut</a> (unassigned by default) or through the <a href=\"#root/_help_F1r9QtzQLZqm\">command palette</a>.</li></ul><p>This will trigger the print preview screen next.</p><h3>Print preview & print options</h3><p>The print preview dialog allows the following printing options to be adjusted:</p><ul><li>The printer to use<ul><li><em>Save as PDF</em> generates a PDF that is structured (maintains a table of contents, keeps the text selectable). Prefer this over other virtual PDF printers that ship with the operating system.</li></ul></li><li>Page orientation: <em>Portrait</em> (default) or <em>Landscape</em>.</li><li>Page size</li><li>Scale the entire content from 10% to 200% to improve the fit within the page.</li><li>Margins, which can be removed completely or adjusted individually for all the four edges.</li><li>Print only a subset of pages. Individual page numbers are separated by colons and hyphen-based ranges are supported (e.g. 3-5 for pages 3 to 5).</li></ul><p>Additional interaction:</p><ul><li><em>Print using system dialog</em> allows setting more options that are otherwise not available in Trilium.</li></ul><p>If the note cannot be rendered with the current options, or stops making progress for 30 seconds, the preview is replaced by an error message. Adjust the options to try again.</p><aside class=\"admonition note\"><p>Most of the options here (except printer & which pages to print) are managed at note level through <a class=\"reference-link\" href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a> (such as <code>#printLandscape</code>, <code>#printPageSize</code>, <code>#printScale</code>, <code>#printMargins</code>).</p><p>This means that the print settings will be restored when printing the same note. There are no default settings that can be configured for all the notes, but this can be achieved via <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable attributes</a>.</p></aside><h2>Printing on the browser</h2><p>This feature allows printing of notes. It works on both the desktop client, but also on the web.</p><p>To print a note, click the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> and select <em>Print/export to PDF…</em>. Depending on the size and type of the note, this can take up to a few seconds. Afterwards you will be redirected to the system/browser printing dialog.</p><p>On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.</p><h2>Reporting issues with the rendering</h2><p>Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to <a href=\"#root/_help_wy8So3yZZlH9\">report the issue</a>. In this case, it's best to offer a sample note (click on the <span class=\"tn-icon cke cke-three-vertical-dots\"></span> button, select <em>Export note</em> → <em>This note and all of its descendants</em> → <em>HTML in ZIP archive</em>). Make sure not to accidentally leak any personal information.</p><p>Consider adjusting font sizes and using <a href=\"#root/_help_CohkqWQC1iBv\">page breaks</a> to work around the layout.</p><aside class=\"admonition tip\"><p>Although direct export as PDF is not available in the browser version of the application, it's still possible to generate a PDF by selecting the <em>Print</em> option instead and selecting “Save to PDF” as the printer (depending on the browser). Generally, Mozilla Firefox has better printing capabilities.</p></aside><h3>Automatic opening of the file</h3><p>When the PDF is exported, it is automatically opened with the system default application for easy preview.</p><p>Note that if you are using Linux with the GNOME desktop environment, sometimes the default application might seem incorrect (such as opening in GIMP). This is because it uses Gnome's “Recommended applications” list.</p><p>To solve this, you can change the recommended application for PDFs via this command line. First, list the available applications via <code>gio mime application/pdf</code> and then set the desired one. For example to use GNOME's Evince:</p><pre><code class=\"language-text-x-trilium-auto\">gio mime application/pdf</code></pre><h2>Printing multiple notes</h2><p>Since v0.100.0, it is possible to print more than one note at the time by using <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>:</p><ol><li>First create a collection.</li><li>Configure it to use <a class=\"reference-link\" href=\"#root/_help_mULW0Q3VojwY\">List View</a>.</li><li>Print the collection note normally.</li></ol><p>The resulting collection will contain all the children of the collection, while maintaining the hierarchy.</p><aside class=\"admonition note\"><p>Not all note types are supported when printing or exporting to PDF. When an unsupported note is encountered, it is skipped. At the end, if any of the notes were skipped, a message will be displayed with the possibility of viewing the full list of skipped notes. The same limitations as the ones described in <em>Constraints & limitations</em> apply.</p></aside><h2>Keyboard shortcut</h2><p>It's possible to trigger both printing and export as PDF from the keyboard by going to <em>Keyboard shortcuts</em> in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> and assigning a key combination for:</p><ul><li><em>Print Active Note</em></li><li><em>Export Active Note as PDF</em></li></ul><h2>Constraints & limitations</h2><p>Not all <a class=\"reference-link\" href=\"#root/_help_KSZ04uQ2D1St\">Note Types</a> are supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options will be disabled.</p><ul><li>For <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> notes, font, background and table colors are printed in the shades of light themes, whatever the current theme (see <a class=\"reference-link\" href=\"#root/_help_Gr6xFaF6ioJ5\">General formatting</a>).</li><li><a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> notes are printed with line numbers and syntax highlighting, in the <em>Light theme</em> of <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em> → <em>Appearance</em>, whatever the current theme.</li><li>A <a class=\"reference-link\" href=\"#root/_help_HcABDtFCkbFN\">Render Note</a> is printed as it is displayed, without running its script again, once its <code>~renderNote</code> relation is set.</li><li>For <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a>, the following are supported:<ul><li><a class=\"reference-link\" href=\"#root/_help_mULW0Q3VojwY\">List View</a>, allowing to print multiple notes at once while preserving hierarchy (similar to a book).</li><li><a class=\"reference-link\" href=\"#root/_help_zP3PMqaG71Ct\">Presentation</a>, where each slide/sub-note is displayed.<ul><li>Most note types are supported, especially the ones that have an image representation such as <a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a> and <a class=\"reference-link\" href=\"#root/_help_gBbsAeiuUxI5\">Mind Map</a>.</li></ul></li><li><a class=\"reference-link\" href=\"#root/_help_2FvYrpmOXm29\">Table</a>, where the table is rendered in a print-friendly way.<ul><li>Tables that are too complex (especially if they have multiple columns) might not fit properly, however tables with a large number of rows are supported thanks to pagination.</li><li>Consider printing in landscape mode, or using <code>#printLandscape</code> if exporting to PDF.</li></ul></li><li>The rest of the collections are not supported, but we plan to add support for all the collection types at some point.</li></ul></li><li>Using <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a> for printing is no longer supported, instead a custom <code>printCss</code> relation needs to be used (see below).</li></ul><h2>Customizing the print CSS</h2><p>As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a> will not work for printing.</p><p>To do so:</p><ul><li>Create a CSS <a href=\"#root/_help_6f9hih2hXXZk\">code note</a>.</li><li>On the note being printed, apply the <code>~printCss</code> relation to point to the newly created CSS code note.</li><li>To apply the CSS to multiple notes, consider using <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable attributes</a> or <a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>.</li></ul><p>For example, to change the font of the document from the one defined by the theme or the user to a serif one:</p><pre><code class=\"language-text-x-trilium-auto\">body {\n\t--print-font-family: serif;\n --print-font-size: 11pt;\n}</code></pre><aside class=\"admonition important\"><p>When altering <code>--print-font-family</code>, make sure the change is done at <code>body</code> level and not <code>:root</code>, since otherwise it won't be picked up due to specificity rules.</p></aside><p>To remark:</p><ul><li>Multiple CSS notes can be add by using multiple <code>~printCss</code> relations.</li><li>If the note pointing to the <code>printCss</code> doesn't have the right note type or mime type, it will be ignored.</li><li>If migrating from a previous version where <a class=\"reference-link\" href=\"#root/_help_AlhDUqhENtH7\">Custom app-wide CSS</a>, there's no need for <code>@media print {</code> since the style-sheet is used only for printing.</li></ul><h2>Under the hood</h2><p>Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF.</p><p>The webpage that renders a single note can actually be accessed in a web browser. For example <code>http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk</code> becomes <code>http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ</code>.</p><p>Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in <a class=\"reference-link\" href=\"#root/_help_0ESUbbAxVnoK\">Note List</a>.</p>","_help_CoFPLs3dRlXc": "<p>Some note types such as <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>, <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> notes and even some of the <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed.</p><h2>Automatic read-only mode</h2><p>For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary.</p><p>This behavior can be disabled on a per-note basis, by following the instructions of the next section.</p><p>In addition, it's possible to change the number of characters at which the automatic read-only mode will trigger in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> by going to the options for <a class=\"reference-link\" href=\"#root/_hidden/_options/_optionsTextNotes\">Text Notes</a> and <a class=\"reference-link\" href=\"#root/_hidden/_options/_optionsCodeNotes\">Code Notes</a>.</p><h2>Changing a note's read-only behavior</h2><p>A note's read-only behavior can be changed via <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> → <em>Editable.</em> The following options are possible:</p><ul><li><strong>Auto</strong><br>This is the default behavior in which the note will be editable by default, unless it becomes large enough to trigger read-only mode.</li><li><strong>Read-only</strong><br>The note will be always marked as read-only, regardless of its size. Nevertheless, it's still possible to temporarily edit the note if needed. This is generally useful for notes that are not prone to change.</li><li><strong>Always editable</strong><br>This option will bypass the automatic read-only activation for this particular note. It's useful for large notes that are frequently edited.</li></ul><p>If the <em>Editable</em> section is missing from the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>, then the note type does not support read-only mode.</p><h3>Manually setting the options</h3><p>Apart from using the <a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a> as previously mentioned, it's also possible to use <a href=\"#root/_help_zEY4DaJG4YT5\">labels</a> to change the behavior:</p><ul><li>To set as read-only, apply the <code>readOnly</code> label to the note.</li><li>To disable automatic read-only (always editable), apply the <code>autoReadOnlyDisabled</code> label.</li></ul><h2>Temporarily editing a read-only note</h2><p>When accessing a read-only note, it's possible to temporarily edit it pressing the <em>Read-only</em> badge.</p><p>When pressed, the note will become editable but will become read-only again after navigating to a different note.</p><p>The pages of the built-in user guide are an exception: they are part of Trilium itself and cannot be edited, not even temporarily. Their <em>Read-only</em> badge cannot be pressed, the note menu does not offer to edit them, and their attributes are shown in the right sidebar without a way to change them.</p>",- "_help_0ESUbbAxVnoK": "<figure class=\"image\"><img style=\"aspect-ratio:990/590;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Note%20List_image.png\" width=\"990\" height=\"590\"></figure><p>When a note has one or more child notes, they will be listed at the end of the note for easy navigation.</p><h2>Configuration</h2><ul><li>To hide the note list for a particular note, simply apply the <code>hideChildrenOverview</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a>.</li><li>For some view types, such as Grid view, only a subset of notes will be displayed and pagination can be used to navigate through all of them for performance reasons. To adjust the number of notes per page, set <code>pageSize</code> to the desired number.</li></ul><h2>View types</h2><p>The view types dictate how the child notes are represented. By default, the notes will be displayed in a grid, however there are also some other view types available.</p><p>Generally the view type can only be changed from the <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a>, but it can also be changed manually on any type of note using the <code>#viewType</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a>.</p><p>Saved searches also offer <em>Search preview</em>, which draws each result as a snippet card with the text and attributes that matched. It is limited to search notes and is described in <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>.</p>",+ "_help_0ESUbbAxVnoK": "<figure class=\"image\"><img style=\"aspect-ratio:990/590;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/Note%20List_image.png\" width=\"990\" height=\"590\"></figure><p>When a note has one or more child notes, they will be listed at the end of the note for easy navigation.</p><h2>Configuration</h2><ul><li>To hide the note list for a particular note, simply apply the <code>hideChildrenOverview</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a>.</li><li>For some view types, such as Grid view, only a subset of notes will be displayed and pagination can be used to navigate through all of them for performance reasons. To adjust the number of notes per page, set <code>pageSize</code> to the desired number.</li></ul><h2>View types</h2><p>The view types dictate how the child notes are represented. By default, the notes will be displayed in a grid, however there are also some other view types available.</p><p>Generally the view type can only be changed from the <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a>, but it can also be changed manually on any type of note using the <code>#viewType</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a>.</p><p>Saved searches use <em>Search preview</em> by default: it draws each result as a snippet card with the text and attributes that matched. It is limited to search notes and is described in <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>.</p>","_help_S0Fos78ZfcY7": "<p>The inbox is the default destination for quickly captured notes. When a note is created without picking a location first, it lands in the inbox. This makes it easy to quickly capture notes and sort them later.</p><h2>Where the inbox is used</h2><ul><li>The <em>New note</em> button in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li><li>The global <em>Create note into inbox</em> shortcut (default <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>P</kbd>).</li><li>The <em>New note</em> action in the <a href=\"#root/_help_7iwde4lsKc6O\">tray icon menu</a>.</li><li>The <a class=\"reference-link\" href=\"#root/_help_MtPxeAWVAzMg\">Web Clipper</a> extension.</li><li>The <em>Create note</em> option offered when a search finds no match, in <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to & command palette</a>, in an empty tab and in the <code>@</code> completion of a text note.</li></ul><h2>Setting a note inbox</h2><p>To create a note inbox, apply the <code>#inbox</code> <a href=\"#root/_help_HI6GBBIduIgv\">label</a> to it.</p><p>Only one note should carry this label. If there are multiple notes, only one will be used by the application.</p><aside class=\"admonition note\"><p>If there is no inbox note, Trilium will fall back to today's <a href=\"#root/_help_l0tKav7yLHGF\">day note</a>, creating it and its calendar ancestors as needed. If the journal has been removed altogether, the note is created at the top level instead of a new journal being built for it.</p></aside><h2>Workspace inboxes</h2><p>Each <a href=\"#root/_help_9sRHySam5fXb\">workspace</a> can have its own inbox, set via the <code>#workspaceInbox</code> label.</p><p>When a new note is created while hoisted in a workspace, the location is determined in the following order:</p><ul><li>A note carrying the <code>#workspaceInbox</code> label in that workspace.</li><li>A note carrying the <code>#inbox</code> within that workspace.</li><li>Today's <a href=\"#root/_help_l0tKav7yLHGF\">day note</a>, if the workspace has a <code>#workspaceCalendarRoot</code>.</li><li>The workspace root note itself.</li></ul>","_help_5Ct4MAJTS4tQ": "<p>Deleted notes are listed in the <em>Deleted Notes</em> dialog (<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> → <em>Show deleted notes</em>) and can be restored by pressing the <em>undelete</em> link.</p><p>If a note has child notes, they will be restored along with it. Should the original location no longer exist (e.g. the parent has been deleted), the note will be restored into the default location for new notes (<a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>).</p><aside class=\"admonition note\"><p>When a note is hoisted in the tree, the dialog will only display notes deleted from the subtree of that hoisted note.</p></aside><p>To permanently erase deleted notes and clear the list, press the three-dots menu and select <em>Erase deleted notes now</em>.</p><p>Deleted notes are permanently erased after a certain amount of time (7 days by default). To change this interval, press the three-dots menu and select <em>Deleted Notes Settings</em>.</p>","_help_m3VlURMSeOrd": "<p>When an empty <a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a> note is created, a note type switcher will appear below the inline <a class=\"reference-link\" href=\"#root/_help_l7pigIGu01K2\">Title</a>. Apart from changing the note type, it's also possible to apply a <a href=\"#root/_help_KC1HB96bqqHX\">template</a>:</p><ul><li><span class=\"tn-icon bx bxl-markdown\"></span> <em>Markdown</em> and <span class=\"tn-icon bx bx-pen\"></span> <em>Canvas</em> switch the note to that type in one click.</li><li><span class=\"tn-icon bx bx-code\"></span> <em>Code</em> lists the scripting notes (<em>Custom CSS</em>, <em>Widget</em> and <em>Backend script</em>), then the enabled code languages.</li><li><span class=\"tn-icon bx bx-book\"></span> <em>Collection</em> and <span class=\"tn-icon bx bx-copy-alt\"></span><em>Template</em> list the collections and the templates.</li><li><span class=\"tn-icon bx bx-dots-vertical-rounded\"></span> <em>All types</em> displays the same menu as <em>Insert note after</em> in the <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a>, with every note type and template.</li></ul><p>Typing while the <span class=\"tn-icon bx bx-code\"></span> <em>Code</em>, <span class=\"tn-icon bx bx-copy-alt\"></span> <em>Template</em> or <span class=\"tn-icon bx bx-dots-vertical-rounded\"></span> <em>All types</em> menu is open narrows it down to the matching entries.</p><p>The switcher will disappear as soon as a text is entered.</p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Notes/New%20note%20type%20switcher_image.png\" width=\"735\" height=\"143\">",@@ -83,7 +83,7 @@"_help_MMiBEQljMQh2": "<p>One of the Trilium's goals is to provide fast and comfortable navigation between notes.</p><h2>Backwards and forward</h2><p>You can use alt-left and alt-right to move back and forward in history of viewed pages.</p><p>This works identically to browser backwards / forwards, it's actually using built-in browser support for this.</p><p><img src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Note%20Navigation_image.jpg\"></p><h2>Jump to note</h2><p>This is useful to quickly find and view arbitrary notes - click on <code>Jump to</code> button on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the note name and autocomplete will help you pick the desired note.</p><p>See <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to Note</a> for more information.</p>","_help_Ms1nauBra7gq": "<figure class=\"image image-style-align-center\"><img style=\"aspect-ratio:659/256;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Quick%20search_image.png\" width=\"659\" height=\"256\"></figure><p>The <em>Quick search</em> function does a full-text search (that is, it searches through the content of notes and not just the title of a note) and displays the result in an easy-to-access manner.</p><p>The alternative to the quick search is the <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> function, which opens in a dedicated tab and has support for advanced queries.</p><p>For even faster navigation, it's possible to use <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to & command palette</a> which will only search through the note titles instead of the content.</p><h2>Layout</h2><p>Based on the <a class=\"reference-link\" href=\"#root/_help_x0JgW8UqGXvq\">Vertical and horizontal layout</a>, the quick search is placed:</p><ul><li>On the vertical layout, it is displayed right above the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>On the horizontal layout, it is displayed in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, where it can be positioned just like any other icon.</li></ul><h2>Search Features</h2><p>Quick search includes the following features:</p><h3>Content Previews</h3><p>Search results now display a 200-character preview of the note content below the note title. This preview shows the context where your search terms appear, making it easier to identify the right note without opening it.</p><h3>All results in one list</h3><p>Quick search lists up to 200 matching notes in a single scrollable list, so the scrollbar shows how many results there are and how far through them you are.</p><h3>Continuing in the full search</h3><p>To refine a query with the options of the full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>, click <em>Show in full search</em> below the results, or press <kbd>Ctrl</kbd>+<kbd>Enter</kbd> in the search field. The full search opens in a new tab with the same query. The button stays below the list, however far the results are scrolled.</p><h3>Visual Features</h3><ul><li><strong>Highlighting</strong>: Search terms appear in bold with accent colors</li><li><strong>Separation</strong>: Results are separated with dividers</li><li><strong>Theme Support</strong>: Highlighting colors adapt to light/dark themes</li></ul><h3>Search Behavior</h3><p>Quick search uses progressive search:</p><ol><li>Shows exact matches first</li><li>Includes fuzzy matches when exact results are fewer than 5</li><li>Exact matches appear before fuzzy matches</li></ol><h3>Search Scope</h3><p>Quick search covers only the subtree you are currently working in:</p><ul><li>Without hoisting, it covers the whole note tree.</li><li>Under a <a href=\"#root/_help_OR8WJ7Iz9K4U\">hoisted note</a> or inside a <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>, it covers only that subtree.</li><li>Notes that exist only in the hidden tree, such as the built-in help pages and the launch bar configuration, are not returned. Hoist into the help to search it, or use <a href=\"#root/_help_F1r9QtzQLZqm\">Jump to…</a>, which searches titles across the hidden tree.</li></ul><p>To search the whole database while hoisted, use the full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a> and leave <em>Ancestor</em> field empty.</p><h3>Keyboard Navigation</h3><ul><li>Press <kbd>Enter</kbd> in the search field to search, or to refresh the results already shown.</li><li>Press <kbd>Down</kbd> in the search field to move to the first result, then <kbd>Up</kbd> and <kbd>Down</kbd> to move between results. <kbd>Up</kbd> on the first result returns to the search field.</li><li>Press <kbd>Page Down</kbd> and <kbd>Page Up</kbd> to move through the results a page at a time.</li><li>Press <kbd>Enter</kbd> on a result to open it.</li><li>Press <kbd>Ctrl</kbd>+<kbd>Enter</kbd> to open the query in the full search.</li><li>Press <kbd>Escape</kbd> to close the results.</li></ul><p>To see these shortcuts on screen, click the <kbd>?</kbd> button below the results, or press <kbd>Alt</kbd>+<kbd>F1</kbd> while the search field is focused.</p><h2>Using Quick Search</h2><ol><li><strong>Typo tolerance</strong>: Search finds results despite minor typos</li><li><strong>Content previews</strong>: 200-character snippets show match context</li><li><strong>Specific terms</strong>: Specific search terms return more focused results</li><li><strong>Match locations</strong>: Bold text indicates where matches occur</li></ol><h2>Quick Search - Exact Match Operator</h2><p>Quick Search shares the same search engine as the full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>, so the exact match operator (<code>=</code>) behaves identically in both. Start your query with <code>=</code> (no space after it) to switch from the default \"contains\" behavior to exact whole-word or phrase matching.</p><p><strong>What</strong> <code>**=**</code> <strong>actually does:</strong> it finds notes where the title or content contains your term as a <strong>whole word or phrase</strong>, ignoring surrounding punctuation. It does <strong>not</strong> require the whole note to equal your term, and it does <strong>not</strong> do substring or fuzzy matching.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>sync</code></td><td><code>synchronize the database now</code></td><td>Yes</td><td>default search matches the substring</td></tr><tr><td><code>=sync</code></td><td><code>see (sync) mode</code></td><td>Yes</td><td><code>=</code> matches the whole word <code>sync</code>, punctuation ignored</td></tr><tr><td><code>=sync</code></td><td><code>synchronize the database now</code></td><td>No</td><td><code>=</code> never matches substrings</td></tr><tr><td><code>=\"project plan\"</code></td><td><code>the (project plan) is ready to share</code></td><td>Yes</td><td>quote a multi-word phrase to match it exactly</td></tr></tbody></table></figure><p>The search is case- and diacritic-insensitive. For the complete explanation of the three matching modes, fuzzy operators and relevance ranking, see <a href=\"#root/_help_eIg8jdvaoNNd\">How search matches your text</a> in the full Search documentation.</p><h3>Limitations</h3><ul><li>The <code>=</code> operator must be at the very beginning of the search query.</li><li>A space immediately after <code>=</code> is treated as a regular search.</li><li>Multiple <code>=</code> operators (like <code>==example</code>) are treated as regular text search.</li></ul><h3>Related Features</h3><ul><li>For attribute, property, boolean and ordering queries, use the full <a href=\"#root/_help_eIg8jdvaoNNd\">Search</a> functionality.</li><li>For fuzzy matching (finding results despite typos), use the <code>~=</code> or <code>~*</code> operators in the full search.</li><li>For partial matches with wildcards, use operators like <code>*=*</code>, <code>=*</code>, or <code>*=</code> in the full search.</li></ul>","_help_F1r9QtzQLZqm": "<figure class=\"image image-style-align-center\"><img style=\"aspect-ratio:991/403;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/1_Jump%20to%20%26%20command%20palette_image.png\" width=\"991\" height=\"403\"></figure><h2>Jump to Note</h2><p>The <em>Jump to Note</em> function allows easy navigation between notes by searching for their title. In addition to that, it can also trigger a full search or create notes.</p><p>To enter the “Jump to” dialog:</p><ul><li>In the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, press <span class=\"tn-icon bx bx-send\"></span> button.</li><li>Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.</li></ul><p>In addition to searching for notes, it is also possible to search for commands. See the dedicated section below for more information.</p><h3>Interaction</h3><ul><li>By default, when there is no text entered it will display the most recent notes.</li><li>Using the keyboard, use the up or down arrow keys to navigate between items. Press <kbd>Enter</kbd> to open the desired note.</li><li>If the note doesn't exist, it's possible to create it by typing the desired note title and selecting one of two options:<ul><li><em>Create note</em> places it in the <a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>: the note labelled <code>#inbox</code>, today's <a class=\"reference-link\" href=\"#root/_help_l0tKav7yLHGF\">Day Notes</a> if there is none, or the top level if there is no journal either. While hoisted into a <a class=\"reference-link\" href=\"#root/_help_9sRHySam5fXb\">Workspaces</a>, the workspace's own inbox is used, then today's day note if the workspace has a <code>#workspaceCalendarRoot</code>, otherwise the workspace root itself. The option names the destination, so it is always visible before the note is created.</li><li><em>Create child note</em> places it under the note that is currently open.</li></ul></li><li>When the title search does not find a note, the bar below the results offers two ways to search further. It stays below the list, however far the results are scrolled. Both are hidden while the field is empty or lists commands.<ul><li>The <em>Include note contents</em> switch searches the content of the notes as well as their titles, and lists what it finds in place of the current results, without leaving the dialog. It stays on while the query changes, until it is switched off. Press <kbd>Shift</kbd>+<kbd>Enter</kbd> to switch it from the keyboard.</li><li><em>Show in full search</em> opens the query in the full <a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>, in a new tab, where its options can refine it. Press <kbd>Ctrl</kbd>+<kbd>Enter</kbd> to run it from the keyboard.</li></ul></li><li>To see the keys the results answer to, click the <kbd>?</kbd> button below the results, or press <kbd>Alt</kbd>+<kbd>F1</kbd> while the search field is focused.</li><li>On a wide enough desktop window, the note highlighted in the results is previewed on their right: its path, title, attributes and the start of its content. The preview follows the highlight as it moves through the results, and is left out for the command palette.</li><li>The options to create a note are listed after the notes. When no note matches, the list says so above them. <kbd>Enter</kbd> opens the note that matches best, or creates the note when none matches. Otherwise, press <kbd>↑</kbd> from the first note to reach the options to create a note.</li></ul><h2>Recent notes</h2><p>Jump to note also has the ability to show the list of recently viewed / edited notes and quickly jump to it.</p><p>To access this functionality, click on <code>Jump to</code> button on the top. By default, (when nothing is entered into autocomplete), this dialog will show the list of recent notes.</p><p>The recent notes are grouped by when they were last visited: <em>Today</em>, <em>Yesterday</em>, <em>Past 7 days</em>, <em>Past 30 days</em> and <em>Older</em>. The same list, with the same groups, opens in any note field that is focused while empty.</p><h2>Command Palette</h2><figure class=\"image image-style-align-center\"><img style=\"aspect-ratio:982/524;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Jump%20to%20%26%20command%20palette_image.png\" width=\"982\" height=\"524\"></figure><p>The command palette is a feature which allows easy execution of various commands that can be found throughout the application, such as from menus or keyboard shortcuts. This feature integrates directly into the “Jump to” dialog.</p><h3>Interaction</h3><p>To trigger the command palette:</p><ul><li>Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>J</kbd> to display the command palette directly.</li><li>If in the “Jump to” dialog, type <code>></code> in the search to switch to the command palette.</li></ul><p>Interaction:</p><ul><li>Type a few words to filter between commands.</li><li>Use the up and down arrows on the keyboard or the mouse to select a command.</li><li>Press <kbd>Enter</kbd> to execute the command.</li></ul><p>To exit the command palette:</p><ul><li>Remove the <code>></code> in the search to go back to the note search.</li><li>Press <kbd>Esc</kbd> to dismiss the dialog entirely.</li></ul><h3>Options available</h3><p>Currently the following options are displayed:</p><ul><li>Most of the <a class=\"reference-link\" href=\"#root/_help_A9Oc6YKKc65v\">Keyboard Shortcuts</a> have an entry, with the exception of those that are too specific to be run from a dialog.</li><li>Some additional options which are not yet available as keyboard shortcuts, but can be accessed from various menus such as: exporting a note, showing attachments, searching for notes or configuring the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><h3>Limitations</h3><p>Currently it's not possible to define custom actions that are displayed in the command palette. In the future this might change by integrating the options in the launch bar, which can be customized if needed.</p>",- "_help_eIg8jdvaoNNd": "<figure class=\"image\"><img style=\"aspect-ratio:987/725;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Search_image.png\" width=\"987\" height=\"725\"></figure><p>Note search enables you to find notes by searching for text in the title, content, or <a href=\"#root/_help_zEY4DaJG4YT5\">attributes</a> of the notes. You also have the option to save your searches, which will create a special search note which is visible on your navigation tree and contains the search results as sub-items.</p><h2>Types of search</h2><p>There are multiple types of searches, all using the same search mechanism and query language:</p><ul><li><a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> which can be found in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> for small one-off searches.<ul><li>The results are shown in a popup and it has an infinite scroll.</li></ul></li><li><em>Full search</em> is the more advanced search mechanism.<ul><li>The results are displayed in a separate page and it has multiple advanced features (search script, fast search, include archived notes, order by, limit).</li><li><a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a> such as adding a label/relation can be applied to the results.</li><li>The results are paginated and they can be displayed in any <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> view (e.g. grid, list, calendar, table).</li></ul></li><li>Some <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> such as board view have a dedicated search bar which applies to that collection.<ul><li>In this case, the results are displayed directly in the collection instead of a popup and they are limited to the collection but the query language remains the same.</li></ul></li></ul><aside class=\"admonition note\"><p><a href=\"#root/_help_F1r9QtzQLZqm\">Jump to note</a> is a similar concept but it's mainly used to search for notes by title, not by content. Nevertheless, it also features a way to search in full text if the results are unsatisfactory.</p></aside><h2>Accessing the search</h2><ul><li>From the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, look for the dedicated <span class=\"tn-icon bx bx-search\"></span> search button.</li><li>To limit the search to a note and its children, select <em>Search in subtree</em> (<span class=\"tn-icon bx bx-search\"></span>) from the <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a> or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>.</li><li>Go to <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to & command palette</a>, look for something then press <em>Show in full search</em> below the results (or <kbd>Ctrl</kbd>+<kbd>Enter</kbd>).</li></ul><h2>Interaction</h2><p>To search for notes, click on the <span class=\"tn-icon bx bx-search\"></span> icon in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> or press the keyboard <a href=\"#root/_help_A9Oc6YKKc65v\">shortcut</a>.</p><ol><li>Set the text to search for in the <em>Search string</em> field.<ol><li>Apart from searching for words literally, there is also the possibility to search for attributes or properties of notes.</li><li>See the examples below for more information.</li></ol></li><li>To limit the search to a note and its sub-children, set a note in <em>Ancestor</em>.<ol><li>This value is also pre-filled if the search is triggered from a <a href=\"#root/_help_OR8WJ7Iz9K4U\">hoisted note</a> or a <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>.</li><li>To search the entire database, keep the value empty.</li></ol></li><li>To limit the search to only a few levels of hierarchy (e.g. look in sub-children but not in sub-sub-children of a note), set the <em>depth</em> field to one of the provided values.</li><li>In addition to that, the search can be configured via the <em>Add search option</em> buttons, as described in the follow-up section.</li><li>Press <em>Search</em> (<span class=\"tn-icon bx bx-search\"></span>) to trigger the search. The results are displayed below the search configuration pane.</li><li>The <em>Search & Execute actions</em> (<span class=\"tn-icon bx bxs-zap\"></span>) button is only relevant if at least one action has been added (as described in the section below).</li><li>The <em>Save to note</em> (<span class=\"tn-icon bx bx-save\"></span>) button will create a new note with the search configuration. For more information, see <a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a>.</li></ol><h2>Features</h2><h3>Autocomplete</h3><p>To help with the syntax, Trilium offers an autocomplete functionality which can be triggered by pressing <kbd>Ctrl</kbd>+<kbd>Space</kbd>.</p><p>Some suggestions also open on their own as you type: label and relation names after <code>#</code> and <code>~</code>, fields after <code>.</code>, operators, values, and notes after <code>@</code>. Keywords such as <code>and</code>, <code>or</code>, <code>not</code>, <code>orderBy</code> and <code>limit</code> appear only on <kbd>Ctrl</kbd>+<kbd>Space</kbd>, since a plain word is usually a search term.</p><p>No suggestion is selected when a list opens on its own, so <kbd>Enter</kbd> runs the search as typed. To insert a suggestion, select it with <kbd>Down</kbd> and press <kbd>Enter</kbd>. The list opened with <kbd>Ctrl</kbd>+<kbd>Space</kbd> and the notes after <code>@</code> open on the best match instead, so <kbd>Enter</kbd> inserts it.</p><p>The autocomplete offers:</p><ul><li>Basic operators such as <code>*=</code> and keywords (<code>limit</code>, <code>not</code>).</li><li>Fields for object-like fields such as <code>note</code> or <code>~relation</code>, triggered by typing <code>.</code>.</li><li>Contextual enumerations such as <code>note.type = \"</code> or <code>note.mime = \"</code>.</li><li><a href=\"#root/_help_HI6GBBIduIgv\">Label</a> names by typing <code>#</code>.<ul><li>A small gear on the name's icon indicates a system attribute.</li><li>After typing the label name, the value is also autocompleted with values that are present in the database.</li></ul></li><li><a href=\"#root/_help_Cq5X6iKQop6R\">Relation</a> names by typing <code>~</code>.</li><li><a href=\"#root/_help_m1lbrzyKDaRB\">Note ID</a>s can be inserted easily by typing <code>@</code> and looking for a note.<ul><li>If the note ID is under a valid syntax, it will be shown as a chip of the note instead of the raw ID.</li><li>This is especially useful for queries that make use of the note ID such as searching by template: <code>~template.noteId = @</code></li></ul></li></ul><h3>Syntax highlighting</h3><p>The search input features syntax highlighting, making recognized fields such as <code>note.</code> and operators like <code>NOT</code> stand out.</p><h3>Error highlighting & linting</h3><p>The search is also checked for errors in two phases, which will be displayed as a red squiggle:</p><ul><li>Linter errors which identify common error patterns and also provide a way to fix them.</li><li>Search errors which are checked by the server, without indicating the exact place the error occurred.</li></ul><p>An error the search only runs into while running, such as an operator that note content cannot be searched with, is shown in a <em>Search error</em> card instead: below the search string, or at the top of the <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> results.</p><h3>Multiline</h3><p>Long or complicated searches can be formatted by using newlines, similar to SQL queries. Newlines are treated just like spaces.</p><p>To add a new line, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.</p><aside class=\"admonition note\"><p>Multiline is available only for the full search, other inputs such as the quick search or the collection filter are single line.</p></aside><h2>Search options</h2><p>Click on which search option to apply from the <em>Add search option</em> section.</p><ul><li>For each search option selected, the search configuration will update to reveal the entry. Each search option will have its own configuration.</li><li>To remove a search option, simply press the <span class=\"tn-icon bx bx-x\"></span> button to the right of it.</li></ul><p>The options available are:</p><ol><li><span class=\"tn-icon bx bx-code\"></span> Search script<ol><li>This feature allows writing a <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> note that will handle the search on its own.</li></ol></li><li><span class=\"tn-icon bx bx-run\"></span> Fast search<ol><li>The search will not look into the content of the notes, but it will still look into note titles and attributes, relations (based on the search query).</li><li>This method can speed up the search considerably for large <a href=\"#root/_help_wX4HbRucYSDD\">databases</a>.</li></ol></li><li><span class=\"tn-icon bx bx-archive\"></span> Include archived<ol><li><a class=\"reference-link\" href=\"#root/_help_MKmLg5x6xkor\">Archived Notes</a> will also be included in the results, whereas otherwise they would be ignored.</li></ol></li><li><span class=\"tn-icon bx bx-arrow-from-top\"></span> Order by<ol><li>Allows changing the criteria for ordering the results, for example to order by creation date or alphabetically instead of by relevancy (default).</li><li>It's also possible to change the order (ascending or descending) of the results.</li></ol></li><li><span class=\"tn-icon bx bx-stop\"></span> Limit<ol><li>Limits the results to a given maximum.</li><li>This can help if the number of results would otherwise be high, at the cost of not being able to view all the results.</li></ol></li><li><span class=\"tn-icon bx bx-bug\"></span> Debug<ol><li>This will print additional information in the server log (see <a class=\"reference-link\" href=\"#root/_help_qzNzp9LYQyPT\">Error logs</a>), regarding how the search expression was parsed.</li><li>This function is especially useful after understanding the search functionality in detail, in order to determine why a complex search query is not working as expected.</li></ol></li><li><span class=\"tn-icon bx bxs-zap\"></span> Action<ol><li>Apart from just searching, it is also possible to apply actions such as to add a label or a relation to the notes that have been matched by the search.</li><li>Unlike other search configurations, here it's possible to apply the same action multiple times (i.e. in order to be able to apply multiple labels to notes).</li><li>The actions given are the same as the ones in <a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a>, which is an alternative for operating directly with notes within the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>After defining the actions, first press <em>Search</em> to check the matched notes and then press <em>Search & Execute actions</em> to trigger the actions.</li></ol></li></ol><h2>Viewing search results</h2><p>Results appear below the search pane. By default they are shown in the <em>List</em> view, one row per note with the note's title and content preview.</p><p>To show a short excerpt of the text that matched instead, choose <em>Search preview</em> from the <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a> bar. Each result is then drawn as a <strong>snippet card</strong> with the note title, the path to it, a short excerpt of the matching text, and the attributes that matched.</p><p>The search will also highlight the words from the title or content that matched:</p><ul><li>With a solid underlined green for a direct match;</li><li>With a dotted underline orange for a partial match (matched by the fuzzy search).</li></ul><p>In addition, the <em>Search preview</em> view offers:</p><ul><li>The <strong>total number of results</strong> is always shown, so you can immediately tell how broad a query is.</li><li>A <strong>page-size selector</strong> lets you choose how many results to display per page. Your choice is remembered and synced across your devices (stored in the <code>searchResultsPageSize</code> option), so you do not have to reset it on every device.</li><li><strong>Clicking a result</strong> opens the note and jumps straight to the first match. The in-note find bar opens pre-filled with the first word of your search, so you can step through its matches with the find controls. To have the find bar look for a whole phrase instead, put the phrase in quotes in the search, e.g. <code>\"The Lord of the Rings\"</code>. In read-only notes, the other words of the search are highlighted as well.</li><li><em>Open all results in new tabs</em> (<span class=\"tn-icon bx bx-window-open\"></span>, the button above the results) opens every result in a tab of its own, up to 50. Each tab opens on its first match with the find bar pre-filled, as when clicking a result.</li><li>If a match is inside a <strong>collapsed section</strong> (for example a folded heading), that section is expanded automatically so the match is visible.</li></ul><h2>Simple Note Search Examples</h2><ul><li><code>rings tolkien</code>: Full-text search to find notes containing both \"rings\" and \"tolkien\".</li><li><code>\"The Lord of the Rings\" Tolkien</code>: Full-text search where \"The Lord of the Rings\" must match exactly.</li><li><code>note.content *=* rings OR note.content *=* tolkien</code>: Find notes containing \"rings\" or \"tolkien\" in their content.</li><li><code>towers #book</code>: Combine full-text and attribute search to find notes containing \"towers\" and having the \"book\" label. Writing <code>towers AND #book</code> does the same; to search for the word \"and\" itself, put it in quotes.</li><li><code>c#</code> or <code>towers#book</code>: A <code>#</code> or <code>~</code> inside a word is part of the text, so these find notes containing \"c#\" or \"towers#book\". To start a label or relation, put a space before it.</li><li><code>towers #book or #author</code>: Search for notes containing \"towers\" and having either the \"book\" or \"author\" label.</li><li><code>towers #!book</code>: Search for notes containing \"towers\" and not having the \"book\" label.</li><li><code>#book #publicationYear = 1954</code>: Find notes with the \"book\" label and \"publicationYear\" set to 1954.</li><li><code>#genre *=* fan</code>: Find notes with the \"genre\" label containing the substring \"fan\". Additional operators include <code>*=*</code> for \"contains\", <code>=*</code> for \"starts with\", <code>*=</code> for \"ends with\", and <code>!=</code> for \"is not equal to\".</li><li><code>#book #publicationYear >= 1950 #publicationYear < 1960</code>: Use numeric operators to find all books published in the 1950s.</li><li><code>#dateNote >= TODAY-30</code>: Find notes with the \"dateNote\" label within the last 30 days. Supported date values include NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years.</li><li><code>~author.title *=* Tolkien</code>: Find notes related to an author whose title contains \"Tolkien\".</li><li><code>#publicationYear %= '19[0-9]{2}'</code>: Use the '%=' operator to match a regular expression (regex). This feature has been available since Trilium 0.52.</li><li><code>note.content %= '\\\\d{2}:\\\\d{2} (PM|AM)'</code>: Find notes that mention a time. Backslashes in a regex must be escaped.</li></ul><h2>Advanced Use Cases</h2><ul><li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search for notes with an \"author\" relation to a note that has a \"son\" relation to \"Christopher Tolkien\". This can be modeled with the following note structure:<ul><li>Books<ul><li>Lord of the Rings<ul><li>label: “book”</li><li>relation: “author” points to “J. R. R. Tolkien” note</li></ul></li></ul></li><li>People<ul><li>J. R. R. Tolkien<ul><li>relation: “son” points to \"Christopher Tolkien\" note</li><li>Christopher Tolkien</li></ul></li></ul></li></ul></li><li><code>~author.title *= Tolkien OR (#publicationDate >= 1954 AND #publicationDate <= 1960)</code>: Use boolean expressions and parentheses to group expressions.</li><li><code>towers (#genre = fantasy OR #genre = scifi)</code>: A group can open the expression part directly, without a <code>#</code> or <code>~</code> before the parenthesis. Here it finds notes containing \"towers\" whose genre is fantasy or scifi.</li><li><code>note.parents.title = 'Books'</code>: Find notes with a parent named \"Books\".</li><li><code>note.parents.parents.title = 'Books'</code>: Find notes with a grandparent named \"Books\".</li><li><code>note.ancestors.title = 'Books'</code>: Find notes with an ancestor named \"Books\".</li><li><code>note.children.title = 'sub-note'</code>: Find notes with a child named \"sub-note\".</li><li><code>note.links.title = 'Tolkien'</code>: Find notes linking to a note named \"Tolkien\".</li><li><code>note.backlinks.title = 'Reading list'</code>: Find the notes that \"Reading list\" links to.</li><li>A link is a relation you created, such as <code>~author</code>, or one that content creates: an internal link (<code>~internalLink</code>), an image (<code>~imageLink</code>), an included note (<code>~includeNoteLink</code>) or a relation map connection (<code>~relationMapLink</code>). Relations that configure a note, such as <code>~template</code> or a saved search's <code>~ancestor</code>, are not links.</li></ul><p>See also <a class=\"reference-link\" href=\"#root/_help_Oxyb6jOjjVNL\">Under the hood</a> for more syntax references.</p><h3>Search with Note Properties</h3><p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>, and <code>revisionCount</code>.</p><p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p><h3>Order by and Limit</h3><pre><code class=\"language-text-x-trilium-auto\">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre><p>This example will:</p><ol><li>Find notes with the author label \"Tolkien\".</li><li>Order the results by <code>publicationDate</code> in descending order.</li><li>Use <code>note.title</code> as a secondary ordering if publication dates are equal.</li><li>Limit the results to the first 10 notes.</li></ol><h3>Negation</h3><p>Some queries can only be expressed with negation:</p><pre><code class=\"language-text-x-trilium-auto\">#book AND not(note.ancestors.title = 'Tolkien')</code></pre><p>This query finds all book notes not in the \"Tolkien\" subtree.</p><h2>Under the Hood</h2><p>See the <a href=\"#root/_help_Oxyb6jOjjVNL\">dedicated page</a> to understand how progressive search works in Trilium, as well as some advanced use cases.</p><h2>Auto-Trigger Search from URL</h2><p>You can open Trilium and automatically trigger a search by including the search <a href=\"https://meyerweb.com/eric/tools/dencoder/\">url encoded</a> string in the URL:</p><p><code>http://localhost:8080/#?searchString=abc</code></p><h2>Search Configuration</h2><h3>Parameters</h3><figure class=\"table\"><table><thead><tr><th>Parameter</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td><code>MIN_FUZZY_TOKEN_LENGTH</code></td><td>3</td><td>Minimum characters the <code>~=</code> and <code>~*</code> operators accept</td></tr><tr><td><code>MAX_EDIT_DISTANCE</code></td><td>2</td><td>Ceiling on character changes, reached only by 7+ character terms; shorter terms allow fewer. See the <em>Fuzzy tolerance</em> section above</td></tr><tr><td><code>RESULT_SUFFICIENCY_THRESHOLD</code></td><td>5</td><td>Minimum exact results before fuzzy fallback</td></tr><tr><td><code>MAX_CONTENT_SIZE</code></td><td>10MB</td><td>Maximum note content size for search processing</td></tr></tbody></table></figure><h3>Limits</h3><ul><li>Searched note content is limited to 10MB per note to prevent performance issues</li><li>Notes exceeding this limit will still be included in title and attribute searches</li><li>Terms of 3 characters or fewer are matched exactly; typo tolerance starts at 4 characters</li></ul>",+ "_help_eIg8jdvaoNNd": "<figure class=\"image\"><img style=\"aspect-ratio:987/725;\" src=\"{{helpAssets}}/User%20Guide/Basic%20Concepts%20and%20Features/Navigation/Search_image.png\" width=\"987\" height=\"725\"></figure><p>Note search enables you to find notes by searching for text in the title, content, or <a href=\"#root/_help_zEY4DaJG4YT5\">attributes</a> of the notes. You also have the option to save your searches, which will create a special search note which is visible on your navigation tree and contains the search results as sub-items.</p><h2>Types of search</h2><p>There are multiple types of searches, all using the same search mechanism and query language:</p><ul><li><a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> which can be found in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> for small one-off searches.<ul><li>The results are shown in a popup and it has an infinite scroll.</li></ul></li><li><em>Full search</em> is the more advanced search mechanism.<ul><li>The results are displayed in a separate page and it has multiple advanced features (search script, fast search, include archived notes, order by, limit).</li><li><a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a> such as adding a label/relation can be applied to the results.</li><li>The results are paginated and they can be displayed in any <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> view (e.g. grid, list, calendar, table).</li></ul></li><li>Some <a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a> such as board view have a dedicated search bar which applies to that collection.<ul><li>In this case, the results are displayed directly in the collection instead of a popup and they are limited to the collection but the query language remains the same.</li></ul></li></ul><aside class=\"admonition note\"><p><a href=\"#root/_help_F1r9QtzQLZqm\">Jump to note</a> is a similar concept but it's mainly used to search for notes by title, not by content. Nevertheless, it also features a way to search in full text if the results are unsatisfactory.</p></aside><h2>Accessing the search</h2><ul><li>From the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, look for the dedicated <span class=\"tn-icon bx bx-search\"></span> search button.</li><li>To limit the search to a note and its children, select <em>Search in subtree</em> (<span class=\"tn-icon bx bx-search\"></span>) from the <a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a> or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd>.</li><li>Go to <a class=\"reference-link\" href=\"#root/_help_F1r9QtzQLZqm\">Jump to & command palette</a>, look for something then press <em>Show in full search</em> below the results (or <kbd>Ctrl</kbd>+<kbd>Enter</kbd>).</li></ul><h2>Interaction</h2><p>To search for notes, click on the <span class=\"tn-icon bx bx-search\"></span> icon in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> or press the keyboard <a href=\"#root/_help_A9Oc6YKKc65v\">shortcut</a>.</p><ol><li>Set the text to search for in the <em>Search string</em> field.<ol><li>Apart from searching for words literally, there is also the possibility to search for attributes or properties of notes.</li><li>See the examples below for more information.</li></ol></li><li>To limit the search to a note and its sub-children, set a note in <em>Ancestor</em>.<ol><li>This value is also pre-filled if the search is triggered from a <a href=\"#root/_help_OR8WJ7Iz9K4U\">hoisted note</a> or a <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>.</li><li>To search the entire database, keep the value empty.</li></ol></li><li>To limit the search to only a few levels of hierarchy (e.g. look in sub-children but not in sub-sub-children of a note), set the <em>depth</em> field to one of the provided values.</li><li>In addition to that, the search can be configured via the <em>Add search option</em> buttons, as described in the follow-up section.</li><li>Press <em>Search</em> (<span class=\"tn-icon bx bx-search\"></span>) to trigger the search. The results are displayed below the search configuration pane.</li><li>The <em>Search & Execute actions</em> (<span class=\"tn-icon bx bxs-zap\"></span>) button is only relevant if at least one action has been added (as described in the section below).</li><li>The <em>Save to note</em> (<span class=\"tn-icon bx bx-save\"></span>) button will create a new note with the search configuration. For more information, see <a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a>.</li></ol><h2>Features</h2><h3>Autocomplete</h3><p>To help with the syntax, Trilium offers an autocomplete functionality which can be triggered by pressing <kbd>Ctrl</kbd>+<kbd>Space</kbd>.</p><p>Some suggestions also open on their own as you type: label and relation names after <code>#</code> and <code>~</code>, fields after <code>.</code>, operators, values, and notes after <code>@</code>. Keywords such as <code>and</code>, <code>or</code>, <code>not</code>, <code>orderBy</code> and <code>limit</code> appear only on <kbd>Ctrl</kbd>+<kbd>Space</kbd>, since a plain word is usually a search term.</p><p>No suggestion is selected when a list opens on its own, so <kbd>Enter</kbd> runs the search as typed. To insert a suggestion, select it with <kbd>Down</kbd> and press <kbd>Enter</kbd>. The list opened with <kbd>Ctrl</kbd>+<kbd>Space</kbd> and the notes after <code>@</code> open on the best match instead, so <kbd>Enter</kbd> inserts it.</p><p>The autocomplete offers:</p><ul><li>Basic operators such as <code>*=</code> and keywords (<code>limit</code>, <code>not</code>).</li><li>Fields for object-like fields such as <code>note</code> or <code>~relation</code>, triggered by typing <code>.</code>.</li><li>Contextual enumerations such as <code>note.type = \"</code> or <code>note.mime = \"</code>.</li><li><a href=\"#root/_help_HI6GBBIduIgv\">Label</a> names by typing <code>#</code>.<ul><li>A small gear on the name's icon indicates a system attribute.</li><li>After typing the label name, the value is also autocompleted with values that are present in the database.</li></ul></li><li><a href=\"#root/_help_Cq5X6iKQop6R\">Relation</a> names by typing <code>~</code>.</li><li><a href=\"#root/_help_m1lbrzyKDaRB\">Note ID</a>s can be inserted easily by typing <code>@</code> and looking for a note.<ul><li>If the note ID is under a valid syntax, it will be shown as a chip of the note instead of the raw ID.</li><li>This is especially useful for queries that make use of the note ID such as searching by template: <code>~template.noteId = @</code></li></ul></li></ul><h3>Syntax highlighting</h3><p>The search input features syntax highlighting, making recognized fields such as <code>note.</code> and operators like <code>NOT</code> stand out.</p><h3>Error highlighting & linting</h3><p>The search is also checked for errors in two phases, which will be displayed as a red squiggle:</p><ul><li>Linter errors which identify common error patterns and also provide a way to fix them.</li><li>Search errors which are checked by the server, without indicating the exact place the error occurred.</li></ul><p>An error the search only runs into while running, such as an operator that note content cannot be searched with, is shown in a <em>Search error</em> card instead: below the search string, or at the top of the <a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> results.</p><h3>Multiline</h3><p>Long or complicated searches can be formatted by using newlines, similar to SQL queries. Newlines are treated just like spaces.</p><p>To add a new line, press <kbd>Shift</kbd>+<kbd>Enter</kbd>.</p><aside class=\"admonition note\"><p>Multiline is available only for the full search, other inputs such as the quick search or the collection filter are single line.</p></aside><h2>Search options</h2><p>Click on which search option to apply from the <em>Add search option</em> section.</p><ul><li>For each search option selected, the search configuration will update to reveal the entry. Each search option will have its own configuration.</li><li>To remove a search option, simply press the <span class=\"tn-icon bx bx-x\"></span> button to the right of it.</li></ul><p>The options available are:</p><ol><li><span class=\"tn-icon bx bx-code\"></span> Search script<ol><li>This feature allows writing a <a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a> note that will handle the search on its own.</li></ol></li><li><span class=\"tn-icon bx bx-run\"></span> Fast search<ol><li>The search will not look into the content of the notes, but it will still look into note titles and attributes, relations (based on the search query).</li><li>This method can speed up the search considerably for large <a href=\"#root/_help_wX4HbRucYSDD\">databases</a>.</li></ol></li><li><span class=\"tn-icon bx bx-archive\"></span> Include archived<ol><li><a class=\"reference-link\" href=\"#root/_help_MKmLg5x6xkor\">Archived Notes</a> will also be included in the results, whereas otherwise they would be ignored.</li></ol></li><li><span class=\"tn-icon bx bx-arrow-from-top\"></span> Order by<ol><li>Allows changing the criteria for ordering the results, for example to order by creation date or alphabetically instead of by relevancy (default).</li><li>It's also possible to change the order (ascending or descending) of the results.</li></ol></li><li><span class=\"tn-icon bx bx-stop\"></span> Limit<ol><li>Limits the results to a given maximum.</li><li>This can help if the number of results would otherwise be high, at the cost of not being able to view all the results.</li></ol></li><li><span class=\"tn-icon bx bx-bug\"></span> Debug<ol><li>This will print additional information in the server log (see <a class=\"reference-link\" href=\"#root/_help_qzNzp9LYQyPT\">Error logs</a>), regarding how the search expression was parsed.</li><li>This function is especially useful after understanding the search functionality in detail, in order to determine why a complex search query is not working as expected.</li></ol></li><li><span class=\"tn-icon bx bxs-zap\"></span> Action<ol><li>Apart from just searching, it is also possible to apply actions such as to add a label or a relation to the notes that have been matched by the search.</li><li>Unlike other search configurations, here it's possible to apply the same action multiple times (i.e. in order to be able to apply multiple labels to notes).</li><li>The actions given are the same as the ones in <a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a>, which is an alternative for operating directly with notes within the <a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>.</li><li>After defining the actions, first press <em>Search</em> to check the matched notes and then press <em>Search & Execute actions</em> to trigger the actions.</li></ol></li></ol><h2>Viewing search results</h2><p>Results appear below the search pane, by default in the <em>Search preview</em> view. Each result is drawn as a <strong>snippet card</strong> with the note title, the path to it, a short excerpt of the matching text, and the attributes that matched.</p><p>To show the results as a plain note list instead, choose <em>List</em> from the <a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a> bar. The <em>List</em> view shows one row per note, with the note's title and content preview.</p><p>The search will also highlight the words from the title or content that matched:</p><ul><li>With a solid underlined green for a direct match;</li><li>With a dotted underline orange for a partial match (matched by the fuzzy search).</li></ul><p>In addition, the <em>Search preview</em> view offers:</p><ul><li>The <strong>total number of results</strong> is always shown, so you can immediately tell how broad a query is.</li><li>A <strong>page-size selector</strong> lets you choose how many results to display per page. Your choice is remembered and synced across your devices (stored in the <code>searchResultsPageSize</code> option), so you do not have to reset it on every device.</li><li><strong>Clicking a result</strong> opens the note and jumps straight to the first match. The in-note find bar opens pre-filled with the first word of your search, so you can step through its matches with the find controls. To have the find bar look for a whole phrase instead, put the phrase in quotes in the search, e.g. <code>\"The Lord of the Rings\"</code>. In read-only notes, the other words of the search are highlighted as well.</li><li><em>Open all results in new tabs</em> (<span class=\"tn-icon bx bx-window-open\"></span>, the button above the results) opens every result in a tab of its own, up to 50. Each tab opens on its first match with the find bar pre-filled, as when clicking a result.</li><li>If a match is inside a <strong>collapsed section</strong> (for example a folded heading), that section is expanded automatically so the match is visible.</li></ul><h2>Simple Note Search Examples</h2><ul><li><code>rings tolkien</code>: Full-text search to find notes containing both \"rings\" and \"tolkien\".</li><li><code>\"The Lord of the Rings\" Tolkien</code>: Full-text search where \"The Lord of the Rings\" must match exactly.</li><li><code>note.content *=* rings OR note.content *=* tolkien</code>: Find notes containing \"rings\" or \"tolkien\" in their content.</li><li><code>towers #book</code>: Combine full-text and attribute search to find notes containing \"towers\" and having the \"book\" label. Writing <code>towers AND #book</code> does the same; to search for the word \"and\" itself, put it in quotes.</li><li><code>c#</code> or <code>towers#book</code>: A <code>#</code> or <code>~</code> inside a word is part of the text, so these find notes containing \"c#\" or \"towers#book\". To start a label or relation, put a space before it.</li><li><code>towers #book or #author</code>: Search for notes containing \"towers\" and having either the \"book\" or \"author\" label.</li><li><code>towers #!book</code>: Search for notes containing \"towers\" and not having the \"book\" label.</li><li><code>#book #publicationYear = 1954</code>: Find notes with the \"book\" label and \"publicationYear\" set to 1954.</li><li><code>#genre *=* fan</code>: Find notes with the \"genre\" label containing the substring \"fan\". Additional operators include <code>*=*</code> for \"contains\", <code>=*</code> for \"starts with\", <code>*=</code> for \"ends with\", and <code>!=</code> for \"is not equal to\".</li><li><code>#book #publicationYear >= 1950 #publicationYear < 1960</code>: Use numeric operators to find all books published in the 1950s.</li><li><code>#dateNote >= TODAY-30</code>: Find notes with the \"dateNote\" label within the last 30 days. Supported date values include NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years.</li><li><code>~author.title *=* Tolkien</code>: Find notes related to an author whose title contains \"Tolkien\".</li><li><code>#publicationYear %= '19[0-9]{2}'</code>: Use the '%=' operator to match a regular expression (regex). This feature has been available since Trilium 0.52.</li><li><code>note.content %= '\\\\d{2}:\\\\d{2} (PM|AM)'</code>: Find notes that mention a time. Backslashes in a regex must be escaped.</li></ul><h2>Advanced Use Cases</h2><ul><li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search for notes with an \"author\" relation to a note that has a \"son\" relation to \"Christopher Tolkien\". This can be modeled with the following note structure:<ul><li>Books<ul><li>Lord of the Rings<ul><li>label: “book”</li><li>relation: “author” points to “J. R. R. Tolkien” note</li></ul></li></ul></li><li>People<ul><li>J. R. R. Tolkien<ul><li>relation: “son” points to \"Christopher Tolkien\" note</li><li>Christopher Tolkien</li></ul></li></ul></li></ul></li><li><code>~author.title *= Tolkien OR (#publicationDate >= 1954 AND #publicationDate <= 1960)</code>: Use boolean expressions and parentheses to group expressions.</li><li><code>towers (#genre = fantasy OR #genre = scifi)</code>: A group can open the expression part directly, without a <code>#</code> or <code>~</code> before the parenthesis. Here it finds notes containing \"towers\" whose genre is fantasy or scifi.</li><li><code>note.parents.title = 'Books'</code>: Find notes with a parent named \"Books\".</li><li><code>note.parents.parents.title = 'Books'</code>: Find notes with a grandparent named \"Books\".</li><li><code>note.ancestors.title = 'Books'</code>: Find notes with an ancestor named \"Books\".</li><li><code>note.children.title = 'sub-note'</code>: Find notes with a child named \"sub-note\".</li><li><code>note.links.title = 'Tolkien'</code>: Find notes linking to a note named \"Tolkien\".</li><li><code>note.backlinks.title = 'Reading list'</code>: Find the notes that \"Reading list\" links to.</li><li>A link is a relation you created, such as <code>~author</code>, or one that content creates: an internal link (<code>~internalLink</code>), an image (<code>~imageLink</code>), an included note (<code>~includeNoteLink</code>) or a relation map connection (<code>~relationMapLink</code>). Relations that configure a note, such as <code>~template</code> or a saved search's <code>~ancestor</code>, are not links.</li></ul><p>See also <a class=\"reference-link\" href=\"#root/_help_Oxyb6jOjjVNL\">Under the hood</a> for more syntax references.</p><h3>Search with Note Properties</h3><p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>, and <code>revisionCount</code>.</p><p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p><h3>Order by and Limit</h3><pre><code class=\"language-text-x-trilium-auto\">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre><p>This example will:</p><ol><li>Find notes with the author label \"Tolkien\".</li><li>Order the results by <code>publicationDate</code> in descending order.</li><li>Use <code>note.title</code> as a secondary ordering if publication dates are equal.</li><li>Limit the results to the first 10 notes.</li></ol><h3>Negation</h3><p>Some queries can only be expressed with negation:</p><pre><code class=\"language-text-x-trilium-auto\">#book AND not(note.ancestors.title = 'Tolkien')</code></pre><p>This query finds all book notes not in the \"Tolkien\" subtree.</p><h2>Under the Hood</h2><p>See the <a href=\"#root/_help_Oxyb6jOjjVNL\">dedicated page</a> to understand how progressive search works in Trilium, as well as some advanced use cases.</p><h2>Auto-Trigger Search from URL</h2><p>You can open Trilium and automatically trigger a search by including the search <a href=\"https://meyerweb.com/eric/tools/dencoder/\">url encoded</a> string in the URL:</p><p><code>http://localhost:8080/#?searchString=abc</code></p><h2>Search Configuration</h2><h3>Parameters</h3><figure class=\"table\"><table><thead><tr><th>Parameter</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td><code>MIN_FUZZY_TOKEN_LENGTH</code></td><td>3</td><td>Minimum characters the <code>~=</code> and <code>~*</code> operators accept</td></tr><tr><td><code>MAX_EDIT_DISTANCE</code></td><td>2</td><td>Ceiling on character changes, reached only by 7+ character terms; shorter terms allow fewer. See the <em>Fuzzy tolerance</em> section above</td></tr><tr><td><code>RESULT_SUFFICIENCY_THRESHOLD</code></td><td>5</td><td>Minimum exact results before fuzzy fallback</td></tr><tr><td><code>MAX_CONTENT_SIZE</code></td><td>10MB</td><td>Maximum note content size for search processing</td></tr></tbody></table></figure><h3>Limits</h3><ul><li>Searched note content is limited to 10MB per note to prevent performance issues</li><li>Notes exceeding this limit will still be included in title and attribute searches</li><li>Terms of 3 characters or fewer are matched exactly; typo tolerance starts at 4 characters</li></ul>","_help_Oxyb6jOjjVNL": "<h2>Progressive Search Strategy</h2><p>Trilium uses a progressive search strategy that performs exact matching first, then adds fuzzy matching when needed.</p><p>The search has three phases:</p><ol><li><strong>Phase 1 - Exact Matching</strong>: When you search, Trilium first looks for exact matches of your search terms. This handles the vast majority of searches (90%+) and returns results almost instantly.</li><li><strong>Phase 2 - Fuzzy Fallback</strong>: If Phase 1 doesn't find enough high-quality results (fewer than 5 results with good relevance scores), Trilium automatically adds fuzzy matching to find results with typos or spelling variations.</li><li><strong>Result Ordering</strong>: Exact matches always appear before fuzzy matches, regardless of individual scores. This ensures that when you search for \"project\", notes containing the exact word \"project\" will appear before notes containing similar words like \"projects\" or \"projection\".</li></ol><h3>Progressive Search Behavior</h3><ul><li><strong>Speed</strong>: Most searches complete using only exact matching</li><li><strong>Ordering</strong>: Exact matches appear before fuzzy matches</li><li><strong>Fallback</strong>: Fuzzy matching activates when exact matches return fewer than 5 results</li><li><strong>Identification</strong>: Results indicate whether they are exact or fuzzy matches</li></ul><h2>Search Performance</h2><p>Search system specifications:</p><ul><li>Content size limit: 10MB per note (previously 50KB)</li><li>Edit distance calculations for fuzzy matching</li><li>Infinite scrolling in Quick Search</li></ul><h2>Label and Relation Shortcuts</h2><p>The \"full\" syntax for searching by labels is:</p><pre><code class=\"language-text-x-trilium-auto\">note.labels.publicationYear = 1954</code></pre><p>For relations:</p><pre><code class=\"language-text-x-trilium-auto\">note.relations.author.title *=* Tolkien</code></pre><p>However, common label and relation searches have shortcut syntax:</p><pre><code class=\"language-text-x-trilium-auto\">#publicationYear = 1954\n~author.title *=* Tolkien</code></pre><h2>Separating Full-Text and Attribute Parts</h2><p>Search syntax allows combining full-text search with attribute-based search. For example, <code>tolkien #book</code> contains:</p><ol><li>Full-text tokens - <code>tolkien</code></li><li>Attribute expressions - <code>#book</code></li></ol><p>Trilium detects the separation between full text search and attribute/property search by looking for certain special characters or words that denote attributes and properties (e.g., #, ~, note.). If you need to include these in full-text search, escape them with a backslash so they are processed as regular text:</p><pre><code class=\"language-text-x-trilium-auto\">\"note.txt\" \n\\#hash \n#myLabel = 'Say \"Hello World\"'</code></pre><h2>Escaping Special Characters</h2><p>Special characters can be enclosed in quotes or escaped with a backslash to be used in full-text search:</p><pre><code class=\"language-text-x-trilium-auto\">\"note.txt\"\n\\#hash\n#myLabel = 'Say \"Hello World\"'</code></pre><p>Three types of quotes are supported: single, double, and backtick.</p><h2>Type Coercion</h2><p>Label values are technically strings but can be coerced for numeric comparisons:</p><pre><code class=\"language-text-x-trilium-auto\">note.dateCreated =* '2019-05'</code></pre><p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear >= 1960</code> convert string values to numbers for comparison.</p>","_help_WbjlujkUhEb5": "<p>The single most common source of confusion is that the <code>=</code> sign means two <em>different</em> things depending on where it appears. Read this section once and the rest of search becomes predictable.</p><p>There are three matching modes:</p><figure class=\"table\"><table><thead><tr><th>Mode</th><th>How you trigger it</th><th>What it matches</th><th>Substring?</th><th>Fuzzy (typos)?</th></tr></thead><tbody><tr><td><strong>Default</strong></td><td>type words with no prefix</td><td>whole words <em>and</em> substrings, anywhere in title, content or attributes, relevance-ranked</td><td>Yes</td><td>Yes</td></tr><tr><td><strong>Exact full-text</strong></td><td>a leading <code>=</code> (e.g. <code>=sync</code>)</td><td>the exact whole word or phrase, ignoring surrounding punctuation</td><td>No</td><td>No</td></tr><tr><td><strong>Attribute / property equality</strong></td><td><code>=</code> inside a <code>#label=value</code> or <code>note.property=value</code> clause</td><td>the <em>entire</em> attribute or property value, exactly</td><td>No</td><td>No</td></tr></tbody></table></figure><h3>Default matching (no prefix)</h3><p><strong>Rule:</strong> typing words with no prefix finds notes that contain those words anywhere in the title, content or attributes, as whole words or as substrings. The closest matches are ranked first.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>sync</code></td><td><code>please sync the folders</code></td><td>Yes (ranked higher)</td><td>contains the exact word <code>sync</code></td></tr><tr><td><code>sync</code></td><td><code>synchronize the database now</code></td><td>Yes (ranked lower)</td><td><code>sync</code> is a substring of <code>synchronize</code></td></tr></tbody></table></figure><h3>Exact match with the <code>=</code> prefix</h3><p><strong>Rule:</strong> a leading <code>=</code> switches the full-text search to exact matching. It finds the whole word or phrase only, ignoring surrounding punctuation, with <strong>no</strong> substring and <strong>no</strong> fuzzy matching. Use it when a normal search returns too many near-matches.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>=sync</code></td><td><code>see (sync) mode</code></td><td>Yes</td><td><code>(sync)</code> is the whole word <code>sync</code>; punctuation is ignored</td></tr><tr><td><code>=sync</code></td><td><code>in sync, then continue</code></td><td>Yes</td><td><code>sync,</code> is the whole word <code>sync</code></td></tr><tr><td><code>=sync</code></td><td><code>he said \"sync\" out loud</code></td><td>Yes</td><td><code>\"sync\"</code> is the whole word <code>sync</code></td></tr><tr><td><code>=sync</code></td><td><code>synchronize the database now</code></td><td>No</td><td><code>=</code> never matches substrings</td></tr><tr><td><code>=sync</code></td><td><code>please send the file</code></td><td>No</td><td><code>=</code> never matches typos / fuzzy</td></tr></tbody></table></figure><p>To match an exact <strong>phrase</strong>, quote it after the <code>=</code> (single, double or backtick quotes all work). The phrase must appear as consecutive words, but punctuation between or around them is ignored:</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note (title or content)</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>=\"project plan\"</code></td><td>title <code>Project Plan</code></td><td>Yes</td><td>the title is exactly the phrase</td></tr><tr><td><code>=\"project plan\"</code></td><td><code>the (project plan) is ready to share</code></td><td>Yes</td><td>the consecutive phrase appears; punctuation is ignored</td></tr><tr><td><code>=\"project plan\"</code></td><td><code>the plan for this project is late</code></td><td>No</td><td>the words are present but not consecutive</td></tr></tbody></table></figure><h3>Attribute and property equality (<code>=</code>, <code>!=</code>)</h3><p><strong>Rule:</strong> when <code>=</code> compares an attribute or property, as in <code>#label=value</code> or <code>note.title=value</code>, it is <strong>strict full-value equality</strong>: the <em>whole</em> value must equal what you typed, ignoring case and diacritics. This is <strong>not</strong> word matching. <code>!=</code> inverts it.</p><p>The examples below assume four notes: <em>Austria</em> (<code>#capital=Vienna</code>), <em>Somewhere</em> (<code>#capital=Vienna Austria</code>), <em>Czech Republic</em> (<code>#capital=Prague</code>) and <em>Switzerland</em> (<code>#capital=Zürich</code>).</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example label value</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>#capital=Vienna</code></td><td><code>Vienna</code></td><td>Yes</td><td>the whole value equals <code>Vienna</code></td></tr><tr><td><code>#capital=Vienna</code></td><td><code>Vienna Austria</code></td><td>No</td><td>the whole value is <code>Vienna Austria</code>, not <code>Vienna</code></td></tr><tr><td><code>#capital=\"Vienna Austria\"</code></td><td><code>Vienna Austria</code></td><td>Yes</td><td>quote a multi-word value to match it in full</td></tr><tr><td><code>#capital=Zurich</code></td><td><code>Zürich</code></td><td>Yes</td><td>equality ignores diacritics</td></tr><tr><td><code>#capital!=Vienna</code></td><td><code>Prague</code></td><td>Yes</td><td><code>!=</code> matches every value that is not <code>Vienna</code></td></tr><tr><td><code>#capital!=Vienna</code></td><td><code>Vienna</code></td><td>No</td><td><code>!=</code> excludes the exact value</td></tr></tbody></table></figure><blockquote><p><strong>Quick search relaxes this.</strong> The <a href=\"#root/_help_Ms1nauBra7gq\">Quick search</a> bar and autocomplete treat an attribute <code>=</code> as \"contains\", so <code>#capital=Vienna</code> typed there also matches <code>Vienna Austria</code>. The strict full-value equality described here applies only in the full Search.</p></blockquote><h3>Fuzzy operators (<code>~=</code> and <code>~*</code>)</h3><p><strong>Rule:</strong> the fuzzy operators tolerate typos. <code>~=</code> (fuzzy-equals) matches a value that is a close whole-word variant of your term. <code>~*</code> (fuzzy-contains) matches when your term appears anywhere inside the value, either as a fragment or as a near-miss. Both work on note properties such as <code>note.title</code> and <code>note.content</code>, and on labels (<code>#label</code>). Fuzzy operators accept terms of at least 3 characters, though how many typos each term tolerates depends on its length — see <em>Fuzzy tolerance</em> below.</p><p>The examples assume a note titled <code>Books</code> carrying the label <code>#author=Tolkien</code>, and a note whose content is <code>learn programming today</code>.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example value</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>note.title ~= boks</code></td><td>title <code>Books</code></td><td>Yes</td><td>one edit away from <code>books</code></td></tr><tr><td><code>#author ~= tolkein</code></td><td>author <code>Tolkien</code></td><td>Yes</td><td><code>tolkein</code> is a typo of <code>tolkien</code></td></tr><tr><td><code>note.content ~* progr</code></td><td><code>learn programming today</code></td><td>Yes</td><td><code>progr</code> is a fragment of <code>programming</code></td></tr><tr><td><code>note.content ~* programing</code></td><td><code>learn programming today</code></td><td>Yes</td><td><code>programing</code> is one edit from <code>programming</code></td></tr></tbody></table></figure><h3>Fuzzy tolerance</h3><p><strong>Rule:</strong> how many typos are tolerated depends on the <strong>length</strong> of your search term. Short terms must match exactly, because a single edit is enough to turn one short word into an unrelated one; longer terms have greater tolerance.</p><figure class=\"table\"><table><thead><tr><th>Term length</th><th>Edits allowed</th></tr></thead><tbody><tr><td>1–3 characters</td><td>0 (exact only)</td></tr><tr><td>4–6 characters</td><td>1</td></tr><tr><td>7+ characters</td><td>2</td></tr></tbody></table></figure><figure class=\"table\"><table><thead><tr><th>Query</th><th>Term length</th><th>Example note content</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>cat</code></td><td>3</td><td><code>a bright red car</code></td><td>No</td><td>No edits are allowed below 4 characters, so <code>cat</code> does not reach <code>car</code></td></tr><tr><td><code>carr</code></td><td>4</td><td><code>a blue debit card</code></td><td>Yes</td><td>1 edit is within budget for 4–6 character terms</td></tr><tr><td><code>ceck</code></td><td>4</td><td><code>the latest tech trends</code></td><td>No</td><td><code>ceck</code>→<code>tech</code> needs 2 edits; only 1 is allowed at this length</td></tr><tr><td><code>combinef</code></td><td>8</td><td><code>the values were combined together</code></td><td>Yes</td><td><code>combinef</code>→<code>combined</code> is 1 edit; up to 2 are allowed at 7+ characters</td></tr></tbody></table></figure><h3>Relevance ranking</h3><p><strong>Rule:</strong> results are ordered by <em>how well</em> they match, not merely whether they match. Exact whole-word and phrase matches rank above substring and fuzzy matches, and a note where your words appear as a consecutive phrase outranks one where they are scattered.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Ranked higher</th><th>Ranked lower</th><th>Why</th></tr></thead><tbody><tr><td><code>sync</code></td><td><code>please sync the folders</code></td><td><code>synchronize the database now</code></td><td>exact word beats substring</td></tr><tr><td><code>you and me</code></td><td><code>I like you and me as a phrase</code></td><td><code>the menu is here and you know it</code></td><td>consecutive phrase beats scattered words</td></tr></tbody></table></figure><h3>What is searchable</h3><p>A search looks at more than the visible body text. All of the following are indexed and searchable:</p><ul><li>note titles,</li><li>note body content,</li><li>labels and relations (<a href=\"#root/_help_zEY4DaJG4YT5\">attributes</a>),</li><li>link URLs and the titles/descriptions of link previews,</li><li>the titles of notes that a note reference-links to.</li></ul><p>The last point is the least obvious: if a note's only content is a reference link to another note, searching for that other note's <strong>title</strong> still finds the linking note.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Setup</th><th>Matches?</th><th>Why</th></tr></thead><tbody><tr><td><code>special topic</code></td><td>a note whose only content is a reference link to a note titled <code>Special Topic</code></td><td>Yes, and the linked target ranks first</td><td>the target's title is indexed into the linking note's searchable text</td></tr><tr><td><code>special</code></td><td>the same note (only a reference link to <code>Special Topic</code>)</td><td>Yes, one word from the target's title is enough</td><td>the indexed title is normalized just like body text, so even one lowercased word matches</td></tr><tr><td><code>zurich</code></td><td>a note whose only content is a reference link to a note titled <code>Zürich</code></td><td>Yes</td><td>the indexed title has its accents normalized, so the plain form matches the accented title</td></tr></tbody></table></figure><h3>Diacritics</h3><p><strong>Rule:</strong> accents are normalized on both sides, so an accented word and its plain form match each other.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th></tr></thead><tbody><tr><td><code>ktory</code></td><td><code>slovo ktorý znamena nieco</code></td><td>Yes</td></tr><tr><td><code>ktorý</code></td><td><code>the word ktory appears here</code></td><td>Yes</td></tr></tbody></table></figure><h3>Regular expressions (<code>%=</code>)</h3><p><strong>Rule:</strong> the <code>%=</code> operator matches a property or label value against a regular expression.</p><figure class=\"table\"><table><thead><tr><th>Query</th><th>Example note content</th><th>Matches?</th></tr></thead><tbody><tr><td><code>note.content %= 'colou?r'</code></td><td><code>my favorite color of all</code></td><td>Yes</td></tr><tr><td><code>note.content %= 'colou?r'</code></td><td><code>my favourite colour of all</code></td><td>Yes</td></tr></tbody></table></figure>","_help_u3YFHC9tQlpm": "<p>Frequently used notes can be bookmarked, which will make them appear in the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> for easy access.</p><h2>Configuring the launch bar</h2><p>If bookmarks don't appear in the launch bar, then most likely the bookmark section has been hidden. Go to the <a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a> configuration from the <a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> and ensure <em>Bookmarks</em> is in the <em>Visible Launchers</em> section.</p><h2>Bookmark folder</h2><p>Space in the left panel is limited, and you might want to bookmark many items. One possible solution is to bookmark a folder, so it shows its children:</p><p>To do this, bookmark a folder and assign it the <code>#bookmarkFolder</code> label.</p><h2>Mobile</h2><p>On mobile, bookmarks are only displayed starting with v0.102.0. Because of the more constrained screen size, the bookmarks are grouped under a single icon instead of displaying them as separate icons.</p><p>When pressed, a menu will appear listing all the bookmarks. Bookmark folders are also supported and will appear as sub-menus.</p>",diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.mdindex c56b7fdfda..c9d1a6c9ed 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md@@ -119,9 +119,9 @@ The options available are:## Viewing search results-Results appear below the search pane. By default they are shown in the _List_ view, one row per note with the note's title and content preview.+Results appear below the search pane, by default in the _Search preview_ view. Each result is drawn as a **snippet card** with the note title, the path to it, a short excerpt of the matching text, and the attributes that matched.-To show a short excerpt of the text that matched instead, choose _Search preview_ from the <a class="reference-link" href="../../Collections/Collection%20Properties.md">Collection Properties</a> bar. Each result is then drawn as a **snippet card** with the note title, the path to it, a short excerpt of the matching text, and the attributes that matched.+To show the results as a plain note list instead, choose _List_ from the <a class="reference-link" href="../../Collections/Collection%20Properties.md">Collection Properties</a> bar. The _List_ view shows one row per note, with the note's title and content preview.The search will also highlight the words from the title or content that matched:diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.mdindex 53714e4989..d4b42077d6 100644--- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md@@ -14,4 +14,4 @@ The view types dictate how the child notes are represented. By default, the noteGenerally the view type can only be changed from the <a class="reference-link" href="../../Collections/Collection%20Properties.md">Collection Properties</a>, but it can also be changed manually on any type of note using the `#viewType` [label](../../Advanced%20Usage/Attributes/Labels.md).-Saved searches also offer _Search preview_, which draws each result as a snippet card with the text and attributes that matched. It is limited to search notes and is described in <a class="reference-link" href="../Navigation/Search.md">Search</a>.\ No newline at end of file+Saved searches use _Search preview_ by default: it draws each result as a snippet card with the text and attributes that matched. It is limited to search notes and is described in <a class="reference-link" href="../Navigation/Search.md">Search</a>.\ No newline at end of file