How to search for content containing "<"? #7188
Replies: 1 comment
-
Searching for content containing "<" in Trilium Notes can be tricky because note content is stored as raw text, but displayed using HTML escaping (so "<" appears as "<") source. The search engine processes the raw text, but the UI may only highlight matches for the escaped entity, causing mismatches. If searching for "<|" doesn't work, it's likely because the search is looking for the raw character, but the UI displays the escaped version. Searching for "<|" may return results, but highlighting won't work as expected due to this disconnect source. Advanced search queries like A known workaround for missing search results is to cut and paste the note content into a new note or subnote, which can refresh the indexing and make the content searchable again source. Font overrides and appearance settings do not affect search behavior—only how characters are rendered. Currently, there is no perfect solution for reliably searching and highlighting "<" in note content. If you need to search for this character, try both the raw character and the escaped entity, and consider refreshing the note content if search results seem incomplete. Highlighting for advanced search queries is a known limitation. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The note content is as follows:
In the appearance settings, "override theme fonts" is checked, and all fonts are set to Arial.
For example, when searching for
<|
, as shown in the two images below:Only when searching for

<|
can the search succeed, but the matched content is not highlighted.If searching with
note.content %= '<\|'
, it seems that all notes are matched.Beta Was this translation helpful? Give feedback.
All reactions