Algolia icon

Algolia

Use Algolia in your n8n workflows

Overview

The "Assign user id" operation in the Clusters resource allows you to assign or move a user ID to a specific cluster within an Algolia multi-cluster setup. This operation is useful for managing user data distribution across clusters, which can help optimize performance and data organization in large-scale applications. The time required to move a user depends on the amount of data linked to that user ID.

Practical examples:

  • Reassigning a user to a different cluster to balance load.
  • Moving user data when scaling or restructuring your Algolia infrastructure.
  • Managing user-specific data locality for compliance or latency reasons.

Properties

Name Meaning
X-Algolia-User-ID Unique identifier of the user who makes the search request. Must match pattern ^[a-zA-Z0-9 \-*.]+$. Required.
Assign User Id Params Parameters for assigning the user ID. Currently supports: Cluster (the cluster name). Required.
Cluster The name of the cluster to which the user ID should be assigned or moved. Optional but required if selected in Assign User Id Params.

Output

The node outputs the JSON response from the Algolia API after attempting to assign or move the user ID to the specified cluster. This typically includes status information about the assignment operation.

No binary data output is involved in this operation.

Dependencies

  • Requires an Algolia API key credential with appropriate permissions to manage clusters and user mappings.
  • The node uses the Algolia API endpoint at https://<appId>.algolia.net.
  • The appId and API key must be configured in the node credentials.

Troubleshooting

  • Invalid User ID format: The user ID must conform to the regex pattern ^[a-zA-Z0-9 \-*.]+$. Providing invalid characters will cause errors.
  • Missing required parameters: Ensure that the X-Algolia-User-ID and Assign User Id Params are provided. If Cluster is selected as a parameter, its value must be set.
  • API authentication errors: Verify that the API key credential is valid and has sufficient permissions.
  • Operation delays: Moving a user ID with large associated data may take time; the operation is proportional to data size.
  • Deprecated multi-cluster operations: Note that multi-cluster operations are deprecated; for issues related to large volumes of data, contact Algolia support.

Links and References


This summary covers the static analysis of the "Assign user id" operation under the "Clusters" resource based on the provided source code and property definitions.

Discussion