SiYuan Search Tool icon

SiYuan Search Tool

Use this tool to search and query the SiYuan knowledge base. Use "fullText" to find content by keywords, "sqlQuery" for advanced database queries, "searchByTag" to find tagged blocks, or "searchByAttribute" to find blocks by attribute values.

Search by Tag

AI-generated

Summary

Searches SiYuan blocks for a tag by querying the blocks table for matching tag text and sorting results by most recently updated.

Inputs

  • Tag (required) — Tag name to search for, without the # symbol. The node passes it into a SQL LIKE pattern.

Output shape

A list of matching SiYuan block records.

Results come from SELECT * FROM blocks WHERE ial LIKE '%tag=%<tag>%' ORDER BY updated DESC; matching uses substring search in the block’s ial field, so it may match tag text that contains the supplied value. Each input item produces its corresponding result. With Continue On Fail enabled, errors are returned as an object containing an error message.

Links

Discussion