@Singleton @Path(value="/recommendWithContext") public final class RecommendWithContext extends AbstractOryxResource
Responds to a GET request to
/recommendWithContext/[userID]/([itemID1(=value1)]/...)
(?howMany=n)(&offset=o)(&considerKnownItems=c)(&rescorerParams=...)
This endpoint operates like a combination of /recommend and /recommendToAnonymous.
It creates recommendations for a user, but modifies the recommendation as if the user also
interacted with a given set of items. This creates no model updates. It's useful for recommending
in the context of some possibly temporary interactions, like products in a basket.
howMany, considerKnownItems and offset behavior, and output, are as in
Recommend.
INPUT_PRODUCER_KEY, MODEL_MANAGER_KEY| Constructor and Description |
|---|
RecommendWithContext() |
| Modifier and Type | Method and Description |
|---|---|
List<IDValue> |
get(String userID,
List<javax.ws.rs.core.PathSegment> pathSegments,
int howMany,
int offset,
boolean considerKnownItems,
List<String> rescorerParams) |
check, check, checkExists, checkNotReadOnly, getServingModel, isReadOnly, maybeBuffer, maybeBuffer, maybeDecompress, parseMultipart, sendInputgetInputProducer, getServingModelManager, init@GET
@Path(value="{userID}/{itemID : .*}")
@Produces(value={"text/plain","text/csv","application/json"})
public List<IDValue> get(@PathParam(value="userID")
String userID,
@PathParam(value="itemID")
List<javax.ws.rs.core.PathSegment> pathSegments,
@DefaultValue(value="10") @QueryParam(value="howMany")
int howMany,
@DefaultValue(value="0") @QueryParam(value="offset")
int offset,
@DefaultValue(value="false") @QueryParam(value="considerKnownItems")
boolean considerKnownItems,
@QueryParam(value="rescorerParams")
List<String> rescorerParams)
throws OryxServingException
OryxServingExceptionCopyright © 2014–2018. All rights reserved.