Recombee SearchItems icon

Recombee SearchItems

SearchItems operation from Recombee

Overview

This node performs search queries on items using the Recombee recommendation service. It allows users to specify a search query, user ID, and other parameters to retrieve relevant items from a Recombee database. The node is useful in scenarios where personalized or scenario-based item search results are needed, such as e-commerce product searches tailored to a specific user or context.

Practical examples include:

  • Searching for products matching a user's query within a personalized recommendation scenario.
  • Retrieving a list of recommended items based on a custom search scenario.
  • Automatically creating new items in the Recombee database if they do not exist (cascade create).

Properties

Name Meaning
Query The search string or query to find matching items.
User ID The identifier of the user for whom the search is performed.
Count The maximum number of items to return in the search results.
Scenario The search scenario name to use, which can influence ranking and filtering of results.
Cascade Create Whether to automatically create the item in the database if it does not already exist.
Max Retries Number of times to retry failed batch requests before failing.
Timeout (Ms) Request timeout duration in milliseconds for each API call.

Output

The node outputs an array of JSON objects, each representing the result of a search operation for an input item. Each output object contains:

  • success: A boolean indicating whether the search was successful.
  • searchResult: The raw search result data returned by the Recombee API for the query.
  • Input parameters echoed back: userId, query, count, scenario.
  • In case of failure, an error field with the error message is included instead of searchResult.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the Recombee service.
  • Uses the official Recombee API client library (recombee-api-client).
  • Needs configuration of the Recombee database ID, private token, and region via credentials.
  • Supports configurable request timeout and retry logic.

Troubleshooting

  • Empty Query Error: If the "Query" property is empty, the node throws an error stating that the query cannot be an empty string. Ensure the query string is provided.
  • API Errors: If the Recombee API returns errors for individual batch requests, the node either throws an error or continues depending on the "Continue On Fail" setting.
  • Timeouts: Requests may fail if the timeout is too low; increase the "Timeout (Ms)" property if necessary.
  • Retries: Batch requests are retried up to the configured "Max Retries" count on failure. Increase this value if transient network issues occur.
  • Credential Issues: Make sure the API key credential is correctly set up with valid database ID, private token, and region.

Links and References

Discussion