Search by Attribute
AI-generatedOverview
The SiYuan Search Tool node allows users to search and query the SiYuan knowledge base. Specifically, the 'Search by Attribute' operation enables finding blocks that have a specific attribute name and a matching attribute value, supporting partial matches. This is useful for filtering and retrieving content based on custom metadata or attributes assigned to blocks within the SiYuan knowledge base.
Use Case Examples
- A user wants to find all blocks where the attribute 'custom-status' contains the value 'in-progress'.
- A user needs to retrieve blocks tagged with a specific attribute value to organize or analyze content.
Properties
| Name | Meaning |
|---|---|
| Attribute Name | The name of the attribute to search for, e.g., 'custom-status'. |
| Attribute Value | The attribute value to match, supporting partial matches, e.g., 'in-progress'. |
Output
JSON
blockId- The unique identifier of the block matching the attribute search.content- The content of the block that matches the attribute criteria.attributes- The attributes of the block, including the searched attribute name and value.
Dependencies
- SiYuan API credentials including API URL and API token for authentication.
Troubleshooting
- Ensure the API credentials (URL and token) are correctly configured and valid to avoid authentication errors.
- If no results are returned, verify that the attribute name and value exist in the SiYuan knowledge base and that partial matching is supported as expected.
- Handle errors gracefully by enabling 'Continue On Fail' to avoid stopping the workflow on individual item errors.