Recommendation sample: boosting concepts
Use the boostBy parameter to give concepts from one scheme more weight over concepts from another scheme.
search(
recommend: {
id: "tcm:5-449"
concepts: [
{
connectorId:"glassware"
}
{
connectorId:"ingredients"
boostBy: 10
}
]
}
)
The above sample allows for both concepts, glassware and ingredients, to affect recommendations, but gives a lot of additional weight to ingredients by setting boostBy to 10 for this concept. (The boostBy level for glassware is not set, so it gets the default value, 1.)
The result of this is that beverages with matching glassware and no matching ingredients can still be recommended, but will be ranked far lower than beverages with matching ingredients, even if there is only one matching ingredient.