Search by Attribute
AI-generatedSummary
Search for blocks in SiYuan that have a specific attribute name and a value partially matching the given string.
Inputs
- Attribute Name (required) — The exact name of the attribute to search for in blocks.
- Attribute Value (required) — The attribute value to match; supports partial matching anywhere within the value.
Output shape
a list of blocks, each represented by a JSON object with properties from the blocks matching the attribute name and value criteria
The search performs a SQL query joining blocks and attributes tables, filtering by attribute name equality and attribute value LIKE condition for partial matching. Results are ordered by update time descending. If no matching blocks are found, an empty list is returned.
Examples
Example 1: Search for blocks whose 'custom-status' attribute contains 'done'
Set 'Attribute Name' to 'custom-status' and 'Attribute Value' to 'done'.