You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations.html)) and a list of related recommendations in a single response.
2611
+
* Returns Item segments that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
2612
+
* It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of segments that shall be returned (`count`).
2613
+
* The base request can be one of:
2614
+
* - [Recommend Item Segments to Item](https://docs.recombee.com/api#recommend-item-segments-to-item)
2615
+
* - [Recommend Item Segments to User](https://docs.recombee.com/api#recommend-item-segments-to-user)
2616
+
* - [Recommend Item Segments to Item Segment](https://docs.recombee.com/api#recommend-item-segments-to-item-segment)
* All the other parameters are inherited from the base request.
2619
+
* *Recommend next Item segments* can be called many times for a single `recommId` and each call returns different (previously not recommended) segments.
2620
+
* The number of *Recommend next Item segments* calls performed so far is returned in the `numberNextRecommsCalls` field.
2621
+
* *Recommend next Item segments* can be requested up to 30 minutes after the base request or a previous *Recommend next Item segments* call.
2622
+
* For billing purposes, each call to *Recommend next Item segments* is counted as a separate recommendation request.
* @param recommId - ID of the base recommendation request for which next recommendations should be returned
2627
+
* @param count - Number of item segments to be recommended
2628
+
*/
2629
+
constructor(
2630
+
recommId: string,
2631
+
count: number,
2632
+
);
2633
+
2634
+
recommId: string;
2635
+
count: number;
2636
+
protected__response_type: RecommendationResponse;
2637
+
2638
+
bodyParameters(): {
2639
+
count: number;
2640
+
};
2641
+
2642
+
queryParameters(): {
2643
+
};
2644
+
}
2645
+
2646
+
/**
2647
+
* Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations)) and a list of related recommendations in a single response.
2610
2648
* It is ideal for use cases such as personalized homepage sections (*Articles from <category>*), *Because You Watched <movie>*, or *Artists Related to Your Favorite Artist <artist>*.
2611
2649
* See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
/** ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. */
2647
2685
segmentId?: string;
2686
+
/** Search query provided by the user. It is used for the full-text search. Only applicable if the *scenario* corresponds to a search scenario. */
2687
+
searchQuery?: string;
2648
2688
/** If the entity for the source recommendation does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that entity, as the entity will be already known to the system. */
2649
2689
cascadeCreate?: boolean;
2650
2690
/** Parameters applied for recommending the *Source* stage. The accepted parameters correspond with the recommendation sub-endpoint used to recommend the *Source*. */
Copy file name to clipboardExpand all lines: lib/requests/composite-recommendation.js
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
constrqs=require("./request");
7
7
8
8
/**
9
-
* Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations.html)) and a list of related recommendations in a single response.
9
+
* Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations)) and a list of related recommendations in a single response.
10
10
* It is ideal for use cases such as personalized homepage sections (*Articles from <category>*), *Because You Watched <movie>*, or *Artists Related to Your Favorite Artist <artist>*.
11
11
* See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
12
12
* **Structure**
@@ -50,6 +50,9 @@ class CompositeRecommendation extends rqs.Request {
50
50
* - *segmentId*
51
51
* - Type: string
52
52
* - Description: ID of the segment from `contextSegmentationId` for which the recommendations are to be generated.
53
+
* - *searchQuery*
54
+
* - Type: string
55
+
* - Description: Search query provided by the user. It is used for the full-text search. Only applicable if the *scenario* corresponds to a search scenario.
53
56
* - *cascadeCreate*
54
57
* - Type: boolean
55
58
* - Description: If the entity for the source recommendation does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that entity, as the entity will be already known to the system.
@@ -72,6 +75,7 @@ class CompositeRecommendation extends rqs.Request {
72
75
this.userId=optional.userId;
73
76
this.logic=optional.logic;
74
77
this.segmentId=optional.segmentId;
78
+
this.searchQuery=optional.searchQuery;
75
79
this.cascadeCreate=optional.cascadeCreate;
76
80
this.sourceSettings=optional.sourceSettings;
77
81
this.resultSettings=optional.resultSettings;
@@ -99,6 +103,9 @@ class CompositeRecommendation extends rqs.Request {
0 commit comments