Algolia icon

Algolia

Use Algolia in your n8n workflows

Clusters → Assign or move a user ID

AI-generated

Overview

This node operation assigns or moves a user ID to a specified cluster within Algolia's multi-cluster setup. It is useful for managing user-to-cluster mappings, which can optimize search performance and data distribution across clusters. For example, you can assign a user ID to a cluster to ensure their search requests are routed appropriately, or move a user ID from one cluster to another as part of cluster management or migration.

Use Case Examples

  1. Assign a user ID 'user1' to the cluster named 'c11-test' to route their search requests to that cluster.
  2. Move an existing user ID to a different cluster to balance load or update cluster assignments.

Properties

Name Meaning
Cluster The name of the cluster to which the user ID will be assigned or moved.
X-Algolia-User-ID The unique identifier of the user who makes the search request, sent as a header in the API request.

Output

JSON

  • json - The JSON response from the Algolia API indicating the result of the assign or move operation.

Dependencies

  • Algolia API with appropriate credentials for authentication

Troubleshooting

  • Ensure the cluster name is valid and exists in your Algolia multi-cluster setup.
  • Verify that the user ID conforms to the allowed pattern (alphanumeric, spaces, hyphens, asterisks, and periods).
  • Check that the API key used has permissions to modify cluster mappings.
  • Common errors include authentication failures, invalid cluster names, or user ID format errors. Verify credentials and input values to resolve these issues.

Links

Discussion