Solr icon

Solr

Interact with Apache Solr

Overview

This node integrates with Apache Solr, a powerful search platform, to perform various document management operations. Specifically, the "Delete All Documents" operation removes every document from the specified Solr core/index. This is useful when you want to clear all indexed data, for example, before reindexing or resetting your search environment.

Practical scenarios include:

  • Resetting a Solr index during development or testing.
  • Clearing outdated or corrupted data before bulk re-import.
  • Automating cleanup tasks in workflows that manage search data lifecycle.

Properties

Name Meaning
Commit Whether to make the changes immediately visible in Solr after deleting all documents. If true, the deletion is committed right away; if false, changes may be delayed until a manual commit.

Output

The output JSON contains the response from the Solr client after attempting to delete all documents. It typically includes success confirmation or details about the operation's result. If the operation succeeds without explicit response data, the node outputs { "success": true }.

No binary data is produced by this operation.

Example output JSON:

{
  "success": true
}

or

{
  // Solr response object with status and other metadata
}

Dependencies

  • Requires an active connection to an Apache Solr server.
  • Needs credentials including host, port, core name, and optionally username/password for basic authentication.
  • The node uses an external Solr client library (@magierin-schnee/solr-client) to communicate with Solr.
  • Proper configuration of the Solr API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Connection failures due to incorrect host, port, or core settings.
    • Authentication errors if username or password are wrong or missing.
    • Permissions issues on the Solr server preventing document deletion.
    • Forgetting to commit changes (if Commit is set to false), which delays visibility of deletions.
  • Error messages:

    • Network or timeout errors indicate connectivity problems.
    • Authorization errors suggest invalid credentials.
    • Solr-specific error responses may indicate malformed requests or server-side issues.
  • Resolutions:

    • Verify Solr server URL, port, and core name.
    • Check and update credentials.
    • Ensure the user has sufficient permissions to delete documents.
    • Set Commit to true to apply changes immediately unless batch committing is intended.

Links and References

Discussion