Skip to content

Commit

Permalink
recombee fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mehedikhan72 committed Aug 28, 2024
1 parent d2c4108 commit 1d66d3e
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ public RecommendationResponse getRecommendationsForUser(Integer userId, Integer
if (userId == -1) {
// popular gigs for anonymous users
return client.send(new RecommendItemsToUser("dummyUser123", numItems)
.setScenario(scenario));
.setScenario(scenario)
.setCascadeCreate(true)
);
} else {
return client.send(new RecommendItemsToUser(userId.toString(), numItems)
.setScenario(scenario));
.setScenario(scenario)
.setCascadeCreate(true)
);
}

} else {
Expand All @@ -105,9 +109,13 @@ public RecommendationResponse getRecommendationsForItem(Integer ItemId, Integer
if (scenario != null) {
// for similar items.
return client.send(new RecommendItemsToItem(ItemId.toString(), UserId.toString(), numItems)
.setScenario(scenario));
.setScenario(scenario)
.setCascadeCreate(true)
);
} else {
return client.send(new RecommendItemsToItem(ItemId.toString(), UserId.toString(), numItems));
return client.send(new RecommendItemsToItem(ItemId.toString(), UserId.toString(), numItems)
.setCascadeCreate(true)
);
}
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 1d66d3e

Please sign in to comment.