Recommend items for userQuery pipeline stage configuration specifications
The Recommend Items for User query pipeline stage uses signals about item choices to recommend other similar items for a specific user. Personalization for the user can be based on the user’s search history, browsing history, or purchase history, and so on.
This pipeline stage uses items-for-user recommendations that have been precomputed by the BPR Recommender.
See also Items-for-user recommendations to learn how to configure this recommender type and fetch recommendations.
Prerequisites
Enable recommendations:
Before creating a Recommend Items for Item stage, enable recommendations.
-
In the Managed Fusion UI – With Query Workbench open, click Settings > Enable Recommendations.
-
Using the REST API – Use this command to enable recommendations:
curl -u USERNAME:PASSWORD -X PUT http://EXAMPLE_COMPANY.lucidworks.cloud/api/v1/collections/COLLECTION_NAME/features/recommendations -H 'content-type: application/json' -d '{"enabled":true}'
Replace EXAMPLE_COMPANY with the name provided by your Lucidworks representative.
|
When you enable recommendations, Managed Fusion creates a query pipeline that already contains this stage, and that is configured for boosting. The query pipeline is COLLECTION_NAME_items_for_user_recommendations .
|
Using live signals
The Estimate Recent Results option uses live signals to augment items-for-user recommendations with real-time recommendations.
When this is enabled, Managed Fusion first looks up items from previously generated recommendations that are similar to the new items. If there are none then it looks up similar users who also interacted with that item to get a list of recommendations based on the new items. It then combines those new recommendations with the job-based recommendations already generated for that user, to generate a final list of recommendations.
Query pipeline stage condition examples
Stages can be triggered conditionally when a script in the Condition field evaluates to true. Some examples are shown below.
Run this stage only for mobile clients:
params.deviceType === "mobile"
Run this stage when debugging is enabled:
params.debug === "true"
Run this stage when the query includes a specific term:
params.q && params.q.includes("sale")
Run this stage when multiple conditions are met:
request.hasParam("fusion-user-name") && request.getFirstParam("fusion-user-name").equals("SuperUser");
!request.hasParam("isFusionPluginQuery")
The first condition checks that the request parameter "fusion-user-name" is present and has the value "SuperUser". The second condition checks that the request parameter "isFusionPluginQuery" is not present.
Configuration
When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.
|