Actions52
- Advanced Actions
- Api Keys Actions
- Clusters Actions
- Dictionaries Actions
- Indices Actions
- Records Actions
- Rules Actions
- Search Actions
- Synonyms Actions
- Vaults Actions
Overview
The "Search user ids" operation under the "Clusters" resource allows users to search for user IDs across multiple clusters in an Algolia multi-cluster setup. This operation performs a prefix search with typo tolerance enabled, meaning it can find user IDs that start with the given query string and tolerate minor typos. If no query is provided, it retrieves all user IDs. The search results are not real-time because the user ID index is rebuilt every 12 hours.
This node is beneficial when you need to locate or filter user IDs distributed across clusters, for example, to analyze user distribution, manage cluster assignments, or audit user data in a multi-cluster environment.
Properties
| Name | Meaning |
|---|---|
| Search User Ids Params | Select which parameters to include in the search request body. Options: Query, Cluster Name, Page, Hits Per Page |
| Query | The prefix search query string with typo tolerance enabled. Empty query returns all users. |
| Cluster Name | Name of the cluster to restrict the search to (optional). |
| Page | Page number of search results to retrieve (default 0). |
| Hits Per Page | Number of hits per page to return (default 20, min 1, max 1000). |
Output
The output contains a JSON object representing the search results from the user IDs index. It includes the matched user IDs and associated metadata such as pagination info. The exact structure depends on the Algolia API response but typically includes fields like hits (array of user IDs), page, hitsPerPage, nbHits (total hits), etc.
No binary data output is indicated for this operation.
Dependencies
- Requires an Algolia account with multi-cluster setup.
- Requires an API key credential with appropriate permissions to access cluster mapping and user ID search endpoints.
- The base URL for API requests is constructed using the Algolia application ID credential.
- The user ID index is updated every 12 hours; thus, the search results reflect the state of the index at the last rebuild.
Troubleshooting
- Stale Data: Since the user ID index updates only every 12 hours, recent changes to user IDs or cluster mappings may not appear immediately. Plan accordingly.
- Empty Results: An empty query returns all users, but if filters like cluster name are too restrictive or incorrect, no results may be returned.
- Invalid Parameters: Ensure numeric parameters like
pageandhitsPerPageare within allowed ranges (e.g.,page >= 0,1 <= hitsPerPage <= 1000). - Authentication Errors: Verify that the API key credential has sufficient permissions to perform cluster and user ID searches.
- Rate Limits: Be aware of Algolia's rate limits and quotas to avoid request failures.
Links and References
- Algolia Multi-Cluster Operations
- User ID Search API Documentation
- Typo Tolerance in Algolia
- Algolia API Key Permissions
Summary of execute() logic (inferred from static analysis):
- Collect input parameters related to user ID search (query, cluster name, page, hits per page).
- Construct a POST request to the endpoint
/1/clusters/mapping/searchwith these parameters in the request body. - Send the request authenticated with the configured API key.
- Return the JSON response containing the search results for user IDs.
This operation enables efficient searching of user IDs across clusters with flexible filtering and pagination options.