Actions6
Overview
This node integrates with Apache Solr, a powerful search platform, to perform various document management operations. Specifically, the "Delete by Query" operation allows users to delete multiple documents from a Solr index based on a custom query string. This is useful for bulk removal of documents matching certain criteria without needing to specify each document individually.
Common scenarios include:
- Removing outdated or irrelevant documents that match specific conditions.
- Cleaning up data after batch processing or data migration.
- Managing Solr indexes by deleting documents that meet complex query filters.
For example, you might delete all documents where the field status equals archived by specifying a query like status:archived.
Properties
| Name | Meaning |
|---|---|
| Commit | Whether to make the deletion changes immediately visible in Solr (true or false). |
| Delete Query | The Solr query string used to select which documents to delete (e.g., field:value). |
Output
The node outputs JSON data representing the response from the Solr server after executing the delete operation. Typically, this includes status information about the deletion request.
Example output structure:
{
"responseHeader": {
"status": 0,
"QTime": 5
}
}
status: Indicates success (0) or failure (non-zero).QTime: Query execution time in milliseconds.
If the operation succeeds but no detailed response is returned, the node outputs { "success": true }.
No binary data is produced by this operation.
Dependencies
- Requires an active connection to an Apache Solr instance.
- Needs credentials including host, port, core, and optionally username/password for basic authentication.
- The node depends on the
@magierin-schnee/solr-clientlibrary to communicate with Solr. - Proper configuration of the Solr API credentials within n8n is necessary.
Troubleshooting
Common issues:
- Incorrect or malformed delete query strings can cause errors or no documents being deleted.
- Network connectivity problems or incorrect Solr endpoint details will prevent successful communication.
- Insufficient permissions or missing authentication credentials may result in authorization errors.
Error messages:
- Errors from Solr typically include HTTP error codes and descriptive messages. For example, a 400 Bad Request may indicate a syntax error in the query.
- Authentication failures will return 401 Unauthorized or 403 Forbidden errors.
Resolutions:
- Verify the correctness of the delete query syntax according to Solr's query language.
- Check network access and ensure the Solr server is reachable.
- Confirm that the API credentials are correctly set up and have sufficient permissions.
- Enable the "Commit" option if immediate visibility of changes is required; otherwise, deletions may not appear until a manual commit.