Actions50
- Collection Actions
- Document Actions
- Search Actions
- Analytics Actions
- API Key Actions
- Alias Actions
- Synonym Actions
- Override Actions
- Conversation Actions
Document → Delete by Query
AI-generatedOverview
This node interacts with the Typesense search platform to delete documents from a specified collection based on a search query. It is useful for scenarios where you need to remove multiple documents that match certain criteria without specifying each document individually. For example, deleting all documents in a collection where a field value meets a condition, such as removing all records of employees with less than a certain number of years at a company.
Use Case Examples
- Delete all documents in the 'employees' collection where the 'status' field is 'inactive'.
- Remove documents from a product catalog collection where the 'stock' field is zero.
Properties
| Name | Meaning |
|---|---|
| Collection Name | The name of the collection in the Typesense instance from which documents will be deleted. |
| Search Query | The search query text used to find documents to delete. |
| Filter By | An optional filter expression to narrow down the documents to delete based on field values. |
Output
JSON
deletedCount- The number of documents deleted as a result of the query.status- Status message or result of the delete operation.
Dependencies
- Requires a Typesense API key credential to authenticate requests to the Typesense server.
Troubleshooting
- Ensure the collection name is correct and exists in the Typesense instance to avoid errors.
- Verify the search query syntax is valid to prevent query parsing errors.
- If no documents are deleted, check that the query and filter criteria correctly match existing documents.
- Handle API errors gracefully, such as network issues or authentication failures, by enabling 'Continue On Fail' if needed.
Links
- Typesense Delete by Query API - Official Typesense documentation for deleting documents by query.