public class RecommendUsersToItem extends Request
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
booster
Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
|
protected java.lang.Boolean |
cascadeCreate
If item of given *itemId* doesn't exist in the database, it creates the missing item.
|
protected java.lang.Long |
count
Number of items to be recommended (N for the top-N recommendation).
|
protected java.lang.Double |
diversity
**Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
expertSettings
Dictionary of custom options.
|
protected java.lang.String |
filter
Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
|
protected java.lang.String[] |
includedProperties
Allows to specify, which properties should be returned when `returnProperties=true` is set.
|
protected java.lang.String |
itemId
ID of the item for which the recommendations are to be generated.
|
protected Logic |
logic
Logic specifies particular behavior of the recommendation models.
|
protected java.lang.Boolean |
returnAbGroup
If there is a custom AB-testing running, return name of group to which the request belongs.
|
protected java.lang.Boolean |
returnProperties
With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary.
|
protected java.lang.String |
scenario
Scenario defines a particular application of recommendations.
|
Constructor and Description |
---|
RecommendUsersToItem(java.lang.String itemId,
long count)
Construct the request
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getBodyParameters()
Get body parameters
|
java.lang.String |
getBooster() |
boolean |
getCascadeCreate() |
long |
getCount() |
double |
getDiversity() |
java.util.Map<java.lang.String,java.lang.Object> |
getExpertSettings() |
java.lang.String |
getFilter() |
HTTPMethod |
getHTTPMethod() |
java.lang.String[] |
getIncludedProperties() |
java.lang.String |
getItemId() |
Logic |
getLogic() |
java.lang.String |
getPath() |
java.util.Map<java.lang.String,java.lang.Object> |
getQueryParameters()
Get query parameters
|
boolean |
getReturnAbGroup() |
boolean |
getReturnProperties() |
java.lang.String |
getScenario() |
RecommendUsersToItem |
setBooster(java.lang.String booster) |
RecommendUsersToItem |
setCascadeCreate(boolean cascadeCreate) |
RecommendUsersToItem |
setDiversity(double diversity) |
RecommendUsersToItem |
setExpertSettings(java.util.Map<java.lang.String,java.lang.Object> expertSettings) |
RecommendUsersToItem |
setFilter(java.lang.String filter) |
RecommendUsersToItem |
setIncludedProperties(java.lang.String[] includedProperties) |
RecommendUsersToItem |
setLogic(Logic logic) |
RecommendUsersToItem |
setReturnAbGroup(boolean returnAbGroup) |
RecommendUsersToItem |
setReturnProperties(boolean returnProperties) |
RecommendUsersToItem |
setScenario(java.lang.String scenario) |
getEnsureHttps, getTimeout, setTimeout
protected java.lang.String itemId
protected java.lang.Long count
protected java.lang.String scenario
protected java.lang.Boolean cascadeCreate
protected java.lang.Boolean returnProperties
protected java.lang.String[] includedProperties
protected java.lang.String filter
protected java.lang.String booster
protected Logic logic
protected java.lang.Double diversity
protected java.util.Map<java.lang.String,java.lang.Object> expertSettings
protected java.lang.Boolean returnAbGroup
public RecommendUsersToItem(java.lang.String itemId, long count)
itemId
- ID of the item for which the recommendations are to be generated.count
- Number of items to be recommended (N for the top-N recommendation).public RecommendUsersToItem setScenario(java.lang.String scenario)
scenario
- Scenario defines a particular application of recommendations. It can be for example "homepage", "cart" or "emailing".
You can set various settings to the [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs.
The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.public RecommendUsersToItem setCascadeCreate(boolean cascadeCreate)
cascadeCreate
- If item of given *itemId* doesn't exist in the database, it creates the missing item.public RecommendUsersToItem setReturnProperties(boolean returnProperties)
returnProperties
- With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying the recommended users.
Example response:
```
{
"recommId": "039b71dc-b9cc-4645-a84f-62b841eecfce",
"recomms":
[
{
"id": "user-17",
"values": {
"country": "US",
"sex": "F"
}
},
{
"id": "user-2",
"values": {
"country": "CAN",
"sex": "M"
}
}
],
"numberNextRecommsCalls": 0
}
```public RecommendUsersToItem setIncludedProperties(java.lang.String[] includedProperties)
includedProperties
- Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
Example response for `includedProperties=country`:
```
{
"recommId": "b2b355dd-972a-4728-9c6b-2dc229db0678",
"recomms":
[
{
"id": "user-17",
"values": {
"country": "US"
}
},
{
"id": "user-2",
"values": {
"country": "CAN"
}
}
],
"numberNextRecommsCalls": 0
}
```public RecommendUsersToItem setFilter(java.lang.String filter)
filter
- Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).public RecommendUsersToItem setBooster(java.lang.String booster)
booster
- Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).public RecommendUsersToItem setLogic(Logic logic)
logic
- Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
See [this section](https://docs.recombee.com/recommendation_logics.html) for list of available logics and other details.
The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
Logic can be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).public RecommendUsersToItem setDiversity(double diversity)
diversity
- **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.public RecommendUsersToItem setExpertSettings(java.util.Map<java.lang.String,java.lang.Object> expertSettings)
expertSettings
- Dictionary of custom options.public RecommendUsersToItem setReturnAbGroup(boolean returnAbGroup)
returnAbGroup
- If there is a custom AB-testing running, return name of group to which the request belongs.public java.lang.String getItemId()
public long getCount()
public java.lang.String getScenario()
public boolean getCascadeCreate()
public boolean getReturnProperties()
public java.lang.String[] getIncludedProperties()
public java.lang.String getFilter()
public java.lang.String getBooster()
public Logic getLogic()
public double getDiversity()
public java.util.Map<java.lang.String,java.lang.Object> getExpertSettings()
public boolean getReturnAbGroup()
public HTTPMethod getHTTPMethod()
getHTTPMethod
in class Request
public java.lang.String getPath()
public java.util.Map<java.lang.String,java.lang.Object> getQueryParameters()
getQueryParameters
in class Request
public java.util.Map<java.lang.String,java.lang.Object> getBodyParameters()
getBodyParameters
in class Request